Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Cannot debug after updating VisualMicro (Read 2187 times)
Natsuki-chan
Junior Member
**
Offline


Posts: 25
Joined: Jan 18th, 2017
Cannot debug after updating VisualMicro
Apr 20th, 2022 at 2:34pm
Print Post  
Hello,

After a long time of using the plugin I decided to update it. However after updating I cannot attach the debugger or start the program with debugging on newly created "Arduino Simple Empty Project". On older projects it still works fine.
When attaching the debugger I get a window "Attach to Process" as if it wanted to debug a program on my PC
When Starting I get the error: 
    Unable to start debugging. Launchoptions string provided by the project system is invalid. This string is null or empty
Flashing does still work without any issue.

The project is a little complex with a lot of library project.
I use Visual Studio 2019 community.
The uploader and debugger is a Black Magic Probe

I hope I have given enough info. The debug tab in output doesn't ever come up.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Cannot debug after updating VisualMicro
Reply #1 - Apr 20th, 2022 at 2:53pm
Print Post  
Thanks for the report.

Can you enable the below options:
  • vMicro > Compiler > Verbose
  • vMicro > Compiler > Show Build Properties
  • vMicro > Uploader > Verbose


Then perform a build on your project, and then try running Debug > Attach to Process, and attach the full output from the Output Window > Micro Build to the report as a text file?
  
Back to top
 
IP Logged
 
Natsuki-chan
Junior Member
**
Offline


Posts: 25
Joined: Jan 18th, 2017
Re: Cannot debug after updating VisualMicro
Reply #2 - Apr 20th, 2022 at 3:58pm
Print Post  
I've enabled the options and added the log of one sketch that fails with a screenshot of when I get when I press attach to process and one log of a sketch that does work.
Both are deployed on the same STM32 and the first sketch was build from a clean solution state.
When attaching I also changed the Startup project to the correct sketch
« Last Edit: Apr 20th, 2022 at 4:03pm by Natsuki-chan »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Cannot debug after updating VisualMicro
Reply #3 - Apr 20th, 2022 at 4:30pm
Print Post  
Thanks for the update.

Can you confirm if you have the below option enabled for your sketch project?
vMicro > General > Active Code Has Priority Over Solution Explorer

When you run Debug > Attach to Process, is the Active text editor the INO sketch from the Active Project?
  
Back to top
 
IP Logged
 
Natsuki-chan
Junior Member
**
Offline


Posts: 25
Joined: Jan 18th, 2017
Re: Cannot debug after updating VisualMicro
Reply #4 - Apr 20th, 2022 at 6:30pm
Print Post  
The option was already enabled and the active text editor is the ino. The active startup project is also the correct one
For the other project it can be any sourcecode related to that ino without problems
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Cannot debug after updating VisualMicro
Reply #5 - Apr 21st, 2022 at 10:40am
Print Post  
Thanks for the update.

Could you attach a screenshot of the whole IDE, with your Arduino project expanded, before attaching the debugger in the failure scenario?

Can you also attach the SLN and VCXPROJ Files from the project you are trying to debug?
  
Back to top
 
IP Logged
 
Natsuki-chan
Junior Member
**
Offline


Posts: 25
Joined: Jan 18th, 2017
Re: Cannot debug after updating VisualMicro
Reply #6 - Apr 21st, 2022 at 2:14pm
Print Post  
I've attached a zip with screenshots and the project folders without code of both the working and nonworking project.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Cannot debug after updating VisualMicro
Reply #7 - Apr 21st, 2022 at 3:25pm
Print Post  
Thanks for the additional information.

If you enable the below option, this should allow the debugger to start as expected for this project:
vMicro > General > Visual Studio Start Commands Use Active Code Instead of Startup Project
  
Back to top
 
IP Logged
 
Natsuki-chan
Junior Member
**
Offline


Posts: 25
Joined: Jan 18th, 2017
Re: Cannot debug after updating VisualMicro
Reply #8 - Apr 21st, 2022 at 3:36pm
Print Post  
I thank you greatly.
After enabling that option debugging worked again. It is still weird since I always set the startup project to the one that I want to debug.
Is that still needed with this option?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Cannot debug after updating VisualMicro
Reply #9 - Apr 21st, 2022 at 3:53pm
Print Post  
Glad it is working again for you.

As long as the project set as the Startup Project is an Arduino project, it will work as expected.

It does no harm to also set the Startup project if this is part of your normal workflow.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint