VOGONS

Common searches


Guide to the DOSBox debugger

Topic actions

Reply 20 of 29, 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 29, 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 29, 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 29, 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 29, 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 29, 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 29, 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.