Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The breakpoint will not currently be hit. Unable to set requested breakpoint on target

Im working on Arduino Uno board recently im stuck with my code, i couldnt debug using print() in ArduinoIde.So i downloaded AtmelStudio 6.2 for debug purpose. when i set the breakpoint and try to build .Im getting the warning The breakpoint will not currently be hit. Unable to set requested breakpoint on target.The current selected deviceis unable to set breakpoints during runtime

please help me sort this issue

like image 528
satish Avatar asked May 27 '15 10:05

satish


People also ask

Why are my breakpoints not being hit?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.


1 Answers

Following workarounds worked with the same problem using ATMega 168P on Atmel Studio 7 with Atmel-ICE.

1. Assembler

Insert the following assembler code where you want your breakpoint:

asm("break");

Please note, this is a really ugly solution and not suitable for all situations. It only works with DEBUGwire and makes your program stop in any case, even if no programmer is attached.

2. Create new project

Creating a new project at a different location helped as well. I copied all the required files to the new folder. The new location has a short path (C:\atmel\project...) and contains no spaces, no umlauts etc.

like image 151
pafodie Avatar answered Oct 29 '22 16:10

pafodie