Homebrew Debugging homebrew

capz

Well-Known Member
OP
Newcomer
Joined
Nov 28, 2014
Messages
74
Trophies
0
Location
cake town
XP
112
Country
Netherlands
So i've been poking around with the homebrew sdk for a little while now and want to port some existing code that I have to it. I got things to compile, but it's really hard to see which parts are malfunctioning on the 3ds because i can't debug it. I dont get any stdout messages in citra (can't seem to find anything) either so I was wondering.. A few people have written homebrew apps/games, so I figured I'd ask here; how do you guys and girls test/debug your code?
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,033
Country
United States
So i've been poking around with the homebrew sdk for a little while now and want to port some existing code that I have to it. I got things to compile, but it's really hard to see which parts are malfunctioning on the 3ds because i can't debug it. I dont get any stdout messages in citra (can't seem to find anything) either so I was wondering.. A few people have written homebrew apps/games, so I figured I'd ask here; how do you guys and girls test/debug your code?
I generally try to make my projects so they can cross compile to windows as well. That way I can test core logic in windows first. For 3ds specific code I will usually start adding print statements. If it gets really bad then I use a function that prints a debug string to the console and waits for a key press (and waits for the release too). And I add it liberally to the code I am troubleshooting in order to isolate the issue. It can take a few builds to find the issue. If you test frequently then you know where to start looking.
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,886
Trophies
2
XP
29,357
Country
United Kingdom
ctrulib has a console that you can activate on one or other screen and print messages to, very useful for narrowing down where/what the problem is in your code. NTR (v1.x for o3ds or v2 for n3ds) actually has a real debugger, haven't used it personally tho.
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
So i've been poking around with the homebrew sdk for a little while now and want to port some existing code that I have to it. I got things to compile, but it's really hard to see which parts are malfunctioning on the 3ds because i can't debug it. I dont get any stdout messages in citra (can't seem to find anything) either so I was wondering.. A few people have written homebrew apps/games, so I figured I'd ask here; how do you guys and girls test/debug your code?


For me, i just use my O3DS ejecting SD card during tests including in the LUA script a button who just crash my LUA interpreter so i can restart the code instantly without going back to hb_menu or home menu.
 

capz

Well-Known Member
OP
Newcomer
Joined
Nov 28, 2014
Messages
74
Trophies
0
Location
cake town
XP
112
Country
Netherlands
I generally try to make my projects so they can cross compile to windows as well. That way I can test core logic in windows first. For 3ds specific code I will usually start adding print statements. If it gets really bad then I use a function that prints a debug string to the console and waits for a key press (and waits for the release too). And I add it liberally to the code I am troubleshooting in order to isolate the issue. It can take a few builds to find the issue. If you test frequently then you know where to start looking.
Yeah I've been trying to shoehorn my desktop code into the 3ds on and off but until i get to the level of crossplatform support that would allow that, I guess I'll need to build minimal test cases first.

For me, i just use my O3DS ejecting SD card during tests including in the LUA script a button who just crash my LUA interpreter so i can restart the code instantly without going back to hb_menu or home menu.
that would be great for C++ :P I envy this

ctrulib has a console that you can activate on one or other screen and print messages to, very useful for narrowing down where/what the problem is in your code. NTR (v1.x for o3ds or v2 for n3ds) actually has a real debugger, haven't used it personally tho.
That might be worth looking into, I haven't attempted to play around with NTR yet
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: there was a "HD" redrawn version of :creep: someone made at one point but i didnt save it