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) Debug window do not pop up (Read 1775 times)
pr
Newbies
*
Offline


Posts: 7
Joined: Jul 12th, 2024
Debug window do not pop up
Jul 15th, 2024 at 5:30am
Print Post  
I am trying to use debugging feature of VM  using a J-link segger probe. I use a microchip samd51 processor. Everything works fine the first times when I create a new folder and compile it. Debug window opens and I can place breakpoints and read variables. But after a few times of fixing errors and saving and opening the files, the debug feature and windows do not show up. I can only compile and download. But I cannot see debug window etc. Any clue what maybe wrong?
  

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


Posts: 2697
Joined: Feb 13th, 2019
Re: Debug window do not pop up
Reply #1 - Jul 15th, 2024 at 8:31am
Print Post  
Thanks for the report.

Are you starting the debugging session using Debug > Start, or using Debug > Attach to Process?

When the debugging session fails to launch, do you see any output in the Output > Debug window at all?
  
Back to top
IP Logged
 
pr
Newbies
*
Offline


Posts: 7
Joined: Jul 12th, 2024
Re: Debug window do not pop up
Reply #2 - Jul 15th, 2024 at 5:49pm
Print Post  
I tried both method. It worked once using debug attached. But now I get the attached error using both Debug>Attach and Debug>start .
  

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


Posts: 2697
Joined: Feb 13th, 2019
Re: Debug window do not pop up
Reply #3 - Jul 16th, 2024 at 8:48am
Print Post  
Just to confirm, when you make changes to the source code, it is being uploaded and the debugging session started afresh each time?

When the debugging session fails to start, does re-plugging the probe and the board help in any way?
  
Back to top
IP Logged
 
pr
Newbies
*
Offline


Posts: 7
Joined: Jul 12th, 2024
Re: Debug window do not pop up
Reply #4 - Jul 16th, 2024 at 5:13pm
Print Post  
I cleaned the build and compiled and it seems the error goes away. However I still do not get the correct debug window where I can hover over variables and see their value. There are several different buttoms for compiling and debugging. There are black colored start and stop bottom in a VM section and there are green and red bottoms in VC. Also there is Debug in drop down menu of VC and there is debug on in the VM sections. Could you please let me know exactly which of debug selection botoms should be on and which bottom I should press to do a debug?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Debug window do not pop up
Reply #5 - Jul 16th, 2024 at 8:11pm
Print Post  
The Debugging is best started with the VS Debug > Start Debugging or Debug > Attach to process (when using Hardware Debugging as you are).

Once the debugging session is started the green Continue, and Red stop buttons of VS are best used, along with it's Step Over/Into/Out buttons.

Once the debugging session is started, all of the VS Windows for Watch/CallStack/Autos etc.. are available from the VS Debug > Windows menu, and the layout of these and which are open is remembered by VS in the background.

Does that help?
  
Back to top
IP Logged
 
pr
Newbies
*
Offline


Posts: 7
Joined: Jul 12th, 2024
Re: Debug window do not pop up
Reply #6 - Jul 16th, 2024 at 9:08pm
Print Post  
I still cannot run the debug. I get a screen as shown in the attached file.
  

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


Posts: 2697
Joined: Feb 13th, 2019
Re: Debug window do not pop up
Reply #7 - Jul 17th, 2024 at 8:18am
Print Post  
Thanks for the update, image files are best attached directly so they show in the forum thread more easily.

If you press [Continue] after the "Frame Not In Module" screen does it then progress to recognisable code?
  
Back to top
IP Logged
 
pr
Newbies
*
Offline


Posts: 7
Joined: Jul 12th, 2024
Re: Debug window do not pop up
Reply #8 - Jul 17th, 2024 at 3:14pm
Print Post  
If I press the continue bottom again it will do the same.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Debug window do not pop up
Reply #9 - Jul 17th, 2024 at 3:26pm
Print Post  
Thanks for confirming.

Also is this the same with a breakpoint set in loop() and using Debug > Attach to Process?

(I only ask as sometimes there is a timing issue where the debugger connects too early to the CPU as it is rebooting with Debug > Start)
  
Back to top
IP Logged
 
pr
Newbies
*
Offline


Posts: 7
Joined: Jul 12th, 2024
Re: Debug window do not pop up
Reply #10 - Jul 17th, 2024 at 3:50pm
Print Post  
I do not use attach to process. I assume when I press green start bottom the debug is automatically attached. If I press attach to process afterward it opens another window see attached.
  

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


Posts: 2697
Joined: Feb 13th, 2019
Re: Debug window do not pop up
Reply #11 - Jul 18th, 2024 at 10:27am
Print Post  
The Start button will perform the compile, upload and attach the debugger as soon as possible.

The Debug > Attach to Process just attaches the debugger.

If you build and upload the code using the vMicro > Build and Upload button, then use Debug > Attach to Process (without pressing the Start button), this will show if there is any issue with the timing of the debugger attaching.

  
Back to top
IP Logged
 
pr
Newbies
*
Offline


Posts: 7
Joined: Jul 12th, 2024
Re: Debug window do not pop up
Reply #12 - Jul 18th, 2024 at 4:18pm
Print Post  
I still get the same issue.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Debug window do not pop up
Reply #13 - Jul 19th, 2024 at 3:03pm
Print Post  
Do you get the same problem with a simple Blink Sketch?

From some further reading, there should be no breakpoints set when the debug session is started, else it can get stuck in the USB code.

Does having no breakpoints set change anything? (then set them once the session has started and the red stop button is shown)

It may also require the bootloader to be removed from the board and the linker script changing, however this is best left as the last option.
https://forums.adafruit.com/viewtopic.php?p=808049
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint