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) Debugging problem (Read 2892 times)
chillstar2000
Newbies
*
Offline


Posts: 8
Joined: Oct 27th, 2019
Debugging problem
Oct 27th, 2019 at 3:09pm
Print Post  
I use visual micro with visual studio 2012. This is the first time I try debug.
Please see attached picture, I set some breakpoints , and click "build and upload", VM shows "Launching Debugger...Debugging has exited"

I try it with different ino file, same result. It is like debug function not work and just build the code. Please help, thanks a lot.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
chillstar2000
Newbies
*
Offline


Posts: 8
Joined: Oct 27th, 2019
Re: Debugging problem
Reply #1 - Oct 27th, 2019 at 10:57pm
Print Post  
here is debug setting.
  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging problem
Reply #2 - Oct 28th, 2019 at 11:28am
Print Post  
Please set the tool bar to release, then follow the guide in yellow above after trying a simple upload without debug.
  
Back to top
IP Logged
 
chillstar2000
Newbies
*
Offline


Posts: 8
Joined: Oct 27th, 2019
Re: Debugging problem
Reply #3 - Oct 28th, 2019 at 2:28pm
Print Post  
Hi, I am a newbie and not very clear for language reason.
I don't want to release code to stm32 board, instead I want to debug it with VM. Why set tool bar to release? 

Thank you very much for help.
Stm32 blue pill mini board, with arduino and stlink.
  
Back to top
 
IP Logged
 
chillstar2000
Newbies
*
Offline


Posts: 8
Joined: Oct 27th, 2019
Re: Debugging problem
Reply #4 - Oct 28th, 2019 at 2:52pm
Print Post  
Set tool bar to release, and close automatic debug, I get this
  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging problem
Reply #5 - Oct 28th, 2019 at 2:56pm
Print Post  
You need normal compile in release mode to work before we look at any questions relating to debug.

A screen shot is not required but the information in the yellow box is required to be followed.

Please attach a txt file, the limit on the post size prevents you posting the output in a message body.

Thanks
« Last Edit: Oct 28th, 2019 at 2:57pm by Tim@Visual Micro »  
Back to top
IP Logged
 
chillstar2000
Newbies
*
Offline


Posts: 8
Joined: Oct 27th, 2019
Re: Debugging problem
Reply #6 - Oct 28th, 2019 at 3:02pm
Print Post  
When set tool bar to debug and automatic debug, get output as attached txt file. Although I set some break points, but no stop ,just compiling and linking until there is a failure infomation.

  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging problem
Reply #7 - Oct 28th, 2019 at 3:10pm
Print Post  
You need to resolve this error(s).

Code
Select All
Error linking for board Generic STM32F103C series
SmartController.cpp.o: In function SmartHandController::tickButtons()
End
Debug build failed for project 'OnStep'
U8g2lib.h:278: multiple definition of nv
OnStep.cpp.o: ibmaple\systick.h:83: first defined here
ld.exe: Warning: size of symbol nv changed from 5128 in OnStep.cpp.o to 1 in addons\St4Serial\SmartHandController\SmartController.cpp.o

St4SerialSlave.cpp.o: In function nvic_globalirq_disable
St4SerialSlave.cpp:122: multiple definition of SerialST4
OnStep.cpp.o: ibmaple\systick.h:83: first defined here
ld.exe: Warning: size of symbol SerialST4 changed from 536 in OnStep.cpp.o to 544 in addons\St4Serial\SmartHandController\St4SerialSlave.cpp.o
ld.exe: enericSTM32F103C\Debug\OnStep.ino.elf section .text will not fit in region rom
ld.exe: region rom overflowed by 135392 bytes 

« Last Edit: Oct 28th, 2019 at 3:11pm by Tim@Visual Micro »  
Back to top
IP Logged
 
chillstar2000
Newbies
*
Offline


Posts: 8
Joined: Oct 27th, 2019
Re: Debugging problem
Reply #8 - Oct 28th, 2019 at 10:36pm
Print Post  
Thanks for reply.I know there are some linking issues, but when setting break points, and automatic debug mode,why compile process does not stop where break points are? It is just go until hit the linking problem.

If succesfully build and download the program first, it is uneccessary to debug it.

Wish you can see my confusion, and thank for your kind help again.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging problem
Reply #9 - Oct 29th, 2019 at 11:14am
Print Post  
Hi,

Debugger work with runing code. They allow you to inspect variables and follow the code as it runs. This helps you find logic mistakes (bugs) in your code.

In programming, compiler and linker errors are not classed as bugs.

Sorry to say you have to be able to produce a running program before you can debug.

  
Back to top
IP Logged
 
chillstar2000
Newbies
*
Offline


Posts: 8
Joined: Oct 27th, 2019
Re: Debugging problem
Reply #10 - Oct 29th, 2019 at 2:00pm
Print Post  
I get what you mean, thank you very much.

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint