VOGONS

Common searches


Guide to the DOSBox debugger

Topic actions

Reply 20 of 33, by intbeam

User metadata
Rank Newbie
Rank
Newbie

Can this be configured for Visual Studio Code? I have set up a basic environment for building programs (games) for DOS using Open Watcom C++ and Visual Studio Code (https://github.com/intbeam/watcom-vscode) and I would absolutely love it if I could set breakpoints and debug the program running in DOSBox from Visual Studio Code instead of doing printf debugging.. Is this possible? And if so, any pointers to where I could start to learn how to configure this?

Reply 21 of 33, by jal

User metadata
Rank Oldbie
Rank
Oldbie
intbeam wrote on 2021-03-12, 13:11:

Can this be configured for Visual Studio Code?

Though this would be really swell, this is not possible, for a number of technical reasons.

JAL

Reply 22 of 33, by xcomcmdr

User metadata
Rank Oldbie
Rank
Oldbie

I would love that too ! Even if it seems next to impossible.
I use masm-tasm with VSCode, which uses DOSBox for running and Turbo Debugger inside DOSBox for debugging. Nice, but no debugging.
It would also be perfect for working on FastDoom (I use Open Watcom for building, VSCode for editing, and DOSBox for running)

Reply 23 of 33, by intbeam

User metadata
Rank Newbie
Rank
Newbie
jal wrote on 2021-03-12, 13:21:
intbeam wrote on 2021-03-12, 13:11:

Can this be configured for Visual Studio Code?

Though this would be really swell, this is not possible, for a number of technical reasons.

JAL

That's what I feared.. It smelled like something too good to be true 😜

xcomcmdr wrote on 2021-03-12, 13:22:

I would love that too ! Even if it seems next to impossible.
I use masm-tasm with VSCode, which uses DOSBox for running and Turbo Debugger inside DOSBox for debugging. Nice, but no debugging.
It would also be perfect for working on FastDoom (I use Open Watcom for building, VSCode for editing, and DOSBox for running)

That's the exact same scenario as I am in.. Developing a top-down RPG game for DOS from scratch, and I'm doing a lot of printf debugging which is a major timewaster for me

But let's hope for the future 😜 Maybe if I get familiar enough with these things I could contribute to DosBox and maybe have a hand at implementing some sort of workaround

Reply 26 of 33, by fargo

User metadata
Rank Newbie
Rank
Newbie
ripsaw8080 wrote on 2021-08-13, 01:03:

In a debug build of DOSBox just use the command "debug prog.com"

I was able to trigger the debugger by setting a breakpoint on INT 21 Exec. The command is:

bpint 21 4b

Reply 27 of 33, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Yes, but then you will have to step through some internal code to get to the program's entry point. Using the DEBUG command to launch the program will break at the program's entry point.

Reply 29 of 33, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

That's probably because the DOS debug program is in the current directory. If that's the case then "z:\debug prog.com" should ensure you use the launcher on DOSBox's virtual drive.

Reply 30 of 33, by videogamer555

User metadata
Rank Member
Rank
Member
Fizzban wrote on 2004-01-22, 03:31:

[*]Unlike the debug version, heavydebug does not use INT 3 to realize breakpoints. This way, they cannot be removed. So if you want to use breakpoints, heavydebug is the better choice.[/list]

Wait how is that an extra feature? If the heavy debug version takes AWAY the ability to use INT 3 breakpoints, that seems like it has FEWER features.

Reply 31 of 33, by jal

User metadata
Rank Oldbie
Rank
Oldbie
videogamer555 wrote on 2023-02-21, 05:23:

Wait how is that an extra feature? If the heavy debug version takes AWAY the ability to use INT 3 breakpoints, that seems like it has FEWER features.

Like I said in that other thread, debuggers use INT 3, not programs themselves. You are confused about INT 3.

JAL

Reply 33 of 33, by Zup

User metadata
Rank Oldbie
Rank
Oldbie

A dumb question... can I put a breakpoint on a port?

I'm trying to know if a game has sound (it doesn't make any noise, but seems to have some sound related functions), so I would like to put breakpoints at the usual suspects (i.e.: output port=0x220, output port=0x388). Maybe I could find if it initializes an Adlib or Sound Blaster card, and which parameters does it use.

Thanks.

I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!