Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Updated to cortex-debug@1.5.1 #1706

Merged
merged 4 commits into from
Dec 1, 2022
Merged

feat: Updated to cortex-debug@1.5.1 #1706

merged 4 commits into from
Dec 1, 2022

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Nov 24, 2022

Depends on #1662


Motivation

To use a more recent version of the cortex-debug VS Code extension.

Change description

Other information

Closes #246
Closes #1582

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

@kittaakos kittaakos changed the title feat: Updated to cortex-debug@1.5.1 feat: Updated to cortex-debug@1.5.1 Nov 24, 2022
@kittaakos kittaakos added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project topic: debugger Related to the integrated debugger labels Nov 24, 2022
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UPDATE: Fixed by 7c3f1bf

An "**RTOS**" UI element was added to the menu bar.

There is no indication to the user that this is associated with the debugger. The fact that it is located on the menu bar, yet is not a menu is also unintuitive.

For now, I think the "Toggle RTOS View" command alone will be sufficient. If it later emerges that a significant portion of Arduino users want more convenient access to the view, perhaps some consideration can be given to exposing it in the IDE's primary UI in some way.

To reproduce

  1. Start Arduino IDE

🐛 The menu bar contains an "RTOS" element:

image

Arduino IDE version

d3cec4f (tester build for 71d8482

Operating system

Windows

Operating system version

10

@kittaakos
Copy link
Contributor Author

Thanks for reporting it. There is not much IDE2 can do but forcefully disable all the contributions the cortex-debug extension adds to VS Code/Theia. Is this what we want?

@kittaakos
Copy link
Contributor Author

🐛 The menu bar contains an "RTOS" element:

It must be a Windows/Linux issue, as there is no RTOS menu on macOS.

Screen Shot 2022-11-28 at 15 58 24

@kittaakos
Copy link
Contributor Author

There is no indication to the user that this is associated with the debugger. The fact that it is located on the menu bar, yet is not a menu is also unintuitive.

For now, I think the "Toggle RTOS View" command alone will be sufficient. If it later emerges that a significant portion of Arduino users want more convenient access to the view, perhaps some consideration can be given to exposing it in the IDE's primary UI in some way.

I removed the view. Let me know if you see a malfunction or notice other undesired things in the UI. Thanks!

Notes, I could see the RTOS view on Windows but not on macOS. I guess there is a bug upstream with the when context evaluation, and that's why the view and menu are visible on Windows but not on macOS. This requires further investigation in Theia.

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it on Windows and Linux and everything is working perfectly.

I verified it fixes #1582

Thanks Akos!


I do want to share some observations:

Required change to config for J-Link users

On Windows, when using a J-Link debug probe, if I set the serverpath field in debug_custom.json to point to JLinkGDBServer, starting the debugger fails with the notification:

Failed to launch undefined GDB Server: Timeout.

If I change the configuration to point to JLinkGDBServerCL instead, it works fine.

The reasons I was previously using JLinkGDBServer:

  • It is specified in Arduino's official tutorial
  • The same executable name can be used on Linux as well (astonishingly, JLinkGDBServer is actually a symlink to JLinkGDBServerCLExe on Linux, not JLinkGDBServerExe as you would expect)

Creation of files in sketch folder

I don't see this as really a problem, but I thought it was worth mentioning since previously no files were added.


If I do the following, a .vscode/.cortex-debug.registers.state.json is added to the sketch:

  1. Start debugger.
  2. Click "Reset device" on the debugger toolbar.
  3. Click the "Stop" icon on the the debugger toolbar.

If I do the following, a .theia/settings.json is added to the sketch:

  1. Start debugger.
  2. Expand the "CORTEX REGISTERS" section of the DEBUG view.
  3. Hover the mouse pointer over the "CORTEX REGISTERS" section toolbar.
  4. Click the 0x icon.

@kittaakos kittaakos marked this pull request as ready for review November 29, 2022 08:21
Base automatically changed from theia-1.31.1 to main November 29, 2022 08:39
Akos Kitta added 4 commits November 29, 2022 14:14
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Closes #246

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Copy link

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how the new debugger is behaving.
Skips the stop at entry point, no jumpToMain required anymore (deprecated), stops at first user breakpoint.
Also the variables in watch are updated correctly and in general seems to work well with JLink

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself topic: debugger Related to the integrated debugger topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to start debugger when watch expressions are configured Update Cortex-Debug to recent version
3 participants