AlchemicRaker / alchemy65

A vscode debugger extension for NES projects using cc65 and ca65.
MIT License
17 stars 4 forks source link

Break point not working #2

Closed andre-paris closed 2 years ago

andre-paris commented 2 years ago

Running over Ubuntu 18.04 with mono 6.10 and Mesen-X 1.0.0

After I hit F5, mesen starts and vscode breaks on my reset function, so far so good, no others breakpoints works anymore after I hit F5 again to continue.

AlchemicRaker commented 2 years ago

It sounds like your code map (dbg file) isn't being loaded properly, or perhaps it's incomplete. A good test is to pause it from the vscode debugger while it's running. It should jump to some point in your code, what was be executed right at that time. Is this happening for you?

AlchemicRaker commented 2 years ago

In addition, could you confirm the version of cc65, and provide a source sample of this happening?

andre-paris commented 2 years ago

Thank you for replying. I'm using ca65 V2.18 The pause worked as you expected, but the break points still not working. I don't know if it can help, but I'm building with absolute paths. Later I gonna create a small project to reproduce and share with you, this one is not possible unfortunately

AlchemicRaker commented 2 years ago

Luckily(?) I've actually encountered this just now. The behavior is that it can pause and step through source as expected, even through source code where breakpoints aren't working. Breakpoints work in some cases but not all, and it seems related to nesting files in the source code. All folders relative to the project root folder:

Breakpoints are working in asm files "src" and "sys". Breakpoints not working in asm files in "sys/uxrom".

AlchemicRaker commented 2 years ago

I've published a fix for this, that fixes the issue I identified on my side. You may update to Alchemy65 1.0.8 and see if it also resolves your issue. If it doesn't, a small project that demonstrates the issue would be very helpful for debugging this.

andre-paris commented 2 years ago

Version 1.0.8 did the job. Thank you