Hacking Homebrew Misc How to Debug an NDS homebrew?

elezzar

Well-Known Member
OP
Newcomer
Joined
Apr 6, 2023
Messages
46
Trophies
0
XP
219
Country
United States
I'm making a DS homebrew with the latest DevKitPro and the Nightfoxlib template, I'm familiar with kind of debugger tools that can run right through the code line by line and show errors. is there any way i can do that or similar while making my DS homebrew? it would also be nice if there was a way to use visual studio codes intelisense

thanks in advance!
 

Cervi

Well-Known Member
Newcomer
Joined
Aug 25, 2022
Messages
46
Trophies
0
Location
Catalonia
XP
394
Country
Spain
Afaik the best way you can debug is by using printfs, or No$GBA, which lets you peek at the registers and the assembly being run, brake at certain points...

I don't think it would be possible to integrate any of that with one of the modern debuggers which run line by line, let you see variables and everything like that.
 

elezzar

Well-Known Member
OP
Newcomer
Joined
Apr 6, 2023
Messages
46
Trophies
0
XP
219
Country
United States
Afaik the best way you can debug is by using printfs, or No$GBA, which lets you peek at the registers and the assembly being run, brake at certain points...

I don't think it would be possible to integrate any of that with one of the modern debuggers which run line by line, let you see variables and everything like that.
thank you!
 

mrparrot2

Well-Known Member
Member
Joined
Nov 29, 2021
Messages
107
Trophies
0
Age
29
Location
SP, Brazil
XP
572
Country
Brazil
Grab an emulador like MelonDS and use nocashWrite function, available on both arm9 and arm7. The output shows in the terminal rather than on screen.
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,034
Country
United States
Thanks heaps I'll check it out 😁
This may be implied and/or obvious, but I would create a wrapper so you can easily swap out nocashWrite with printf for troubleshooting on real hardware. Emulators tend to be more forgiving than hardware so you will want to periodically test on hardware too.
 

elezzar

Well-Known Member
OP
Newcomer
Joined
Apr 6, 2023
Messages
46
Trophies
0
XP
219
Country
United States
This may be implied and/or obvious, but I would create a wrapper so you can easily swap out nocashWrite with printf for troubleshooting on real hardware. Emulators tend to be more forgiving than hardware so you will want to periodically test on hardware too.
noted, thanks again. I'll have to do some research and learn how to create a wrapper.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    BigOnYa @ BigOnYa: I haven't played my Switch n a month or so, just been playing Xbox, and just picked to play lil...