Debugging 6502 program in FCEUXD??

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Debugging 6502 program in FCEUXD??
by on (#64254)
Can we debug a 6502 program like other high level languages?

e.g. can we add watch on memory locations, breakpoint and run the code instruction-by-instruction so as to spot problems in it?

FCEUXD appears to have a decent debugger but I dont know how to use it. :(

by on (#64266)
Open the debugger. Click Add under BreakPoints. Put in the address or the address range you want to debug. Check execute if you want it break when the program counter is set to something in that range (IE the program is running through the instructions at that range), and check read or write if you want it to break when the range is read from, or written to.

From there you can step through the code instruction by instruction and see what A, X, Y, program counter and status flags are.

by on (#64267)
Don't forget that FCEUX is newer, so it has a few debugging features in it that I really wanted to see (ppu pixel number display, Run One Scanline button, etc).

by on (#64270)
Dwedit is right. I used to debug with FCEUXD a lot, but now I use FCEUX, it's more complete and apparently still updated.

by on (#64278)
One thing that the newest FCEUX still lacks (last time I checked, which I think was in the last few weeks) is the ability to place comments and label names in amongst the disassembly of your ROM with namelist files. It seems to be partially implemented but I haven't yet seen it work as well as in FCEUXDSP 1.07.

At one point I really desired the ability to see all my labels and comments from my source code in the disassembly window in FCEUXDSP 1.07. I wrote a namelist file generator called nlgen, for CA65 programs to do just this. It's really great to be able to step through my program complete with comments, it has saved me a lot of time. So yes, you can.