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

Debugging Restart Fails With Azure Sphere Projects #212823

Closed
snehara99 opened this issue May 15, 2024 · 10 comments
Closed

Debugging Restart Fails With Azure Sphere Projects #212823

snehara99 opened this issue May 15, 2024 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@snehara99
Copy link

Does this issue occur when all extensions are disabled?: N/A (extensions are necessary to repro)

  • VS Code Version: 1.89.1 (user setup)
  • OS Version: Windows_NT x64 10.0.22631

Steps to Reproduce:
Note: You cannot reproduce this without an Azure Sphere device so I recorded this video (Microsoft internal).

  1. Install Azure Sphere, Azure Sphere UI, C/C++, CMake, and CMake Tools extensions.
  2. Install Azure Sphere SDK.
  3. Clone Azure Sphere sample app repo and open the project at the path linked.
  4. Connect Azure Sphere device.
  5. Hit "Run and Debug" from side panel.
  6. Open C/C++ extension output panel to see initial launch configuration.
  7. Hit Restart button on debugging toolbar and observe failure.
    a. "launch: property 'program' is missing or empty" notification pops up on bottom right, but you can see that this property was provided in the original launch configuration.
  8. Open C/C++ extension output panel to see launch configuration on restart and observe how it doesn't contain the properties provided by the Azure Sphere extension on the initial launch.

This is the Azure Sphere configuration provider: configurationProvider.ts - Repos (azure.com). Line 548 is where we start debugging. Our code isn't touched again after hitting restart.

This is a screenshot comparing the project's launch.json, the initial launch configuration given to the C/C++ extension and the launch configuration given to the C/C++ extension on restart:
image

@snehara99
Copy link
Author

Please let me know if you'd like a virtual walkthrough

@roblourens
Copy link
Member

The C++ debug adapter doesn't set supportsRestartRequest, right?

@roblourens
Copy link
Member

It looks like you register your own debug adapter type, and resolve it to cppdbg in your provider, is that right?

@snehara99
Copy link
Author

snehara99 commented May 17, 2024

The C++ debug adapter doesn't set supportsRestartRequest, right?

I don't think it does. Should it be?

@snehara99
Copy link
Author

It looks like you register your own debug adapter type, and resolve it to cppdbg in your provider, is that right?

Yes this is right

@roblourens
Copy link
Member

The C++ debug adapter doesn't set supportsRestartRequest, right?

It doesn't I don't think. Should it be?

No, it just enables a different mode for restarting and I'm checking which path it goes down.

@roblourens
Copy link
Member

I was thinking about where the problem could be, and I came across a bug here #212991 and I think it might fix your issue, but I'm not sure.

Our Insiders releases are paused for the Build conference, so this won't be in an Insiders until around next Thursday. You can try then, or build the vscode repo if you want to try it earlier.

@snehara99
Copy link
Author

@roblourens thanks, I'll try it out when it releases. I'm not in a rush

@snehara99
Copy link
Author

@roblourens I tried the insiders release and the issue seems to be fixed! When would this be updated in the main vscode btw?

@roblourens
Copy link
Member

Thanks for confirming. We will release VS Code this week

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded and removed info-needed Issue requires more information from poster labels Jun 5, 2024
@roblourens roblourens added this to the May 2024 milestone Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants