Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2020-09-09 15:57:03

toxa
Member
Registered: 2020-02-13
Posts: 305

WOW!!! SOURCE LEVEL DEBUGGING OF YOUR C CODE IN VS.CODE!

WOW! It happened!!!

Visual Studio Code extension: https://marketplace.visualstudio.com/it … s-debugger from @Calindro!

It works with Emulicious emulator, which supports GameBoy: https://emulicious.net/

You can debug your C code for MSX and other Z80 platforms too.

FANTASTIC!

ps: you need a recent SDCC from http://sdcc.sourceforge.net/snap.php
pps: sources should be compiled with --debug and you should pass -m -w -y to sdldgb linker to produce *.CDB and *.MAP file, they must lie beside the *.GB file.

Last edited by toxa (2020-09-09 16:09:06)

Offline

 

#2 2020-09-09 16:13:43

toxa
Member
Registered: 2020-02-13
Posts: 305

Re: WOW!!! SOURCE LEVEL DEBUGGING OF YOUR C CODE IN VS.CODE!

some sexy images...

C-level stepping:
https://raw.githubusercontent.com/Calindro/emulicious-debugger/master/images/readme/clevel-stepping.gif

C-level breakpoints:
https://raw.githubusercontent.com/Calindro/emulicious-debugger/master/images/readme/clevel-breakpoints.png

C Local Variables:
https://raw.githubusercontent.com/Calindro/emulicious-debugger/master/images/readme/c-local-variables.png

C Inspection of Structured Type:
https://raw.githubusercontent.com/Calindro/emulicious-debugger/master/images/readme/inspection-of-structured-c-types-on-hover.png
and so on, and so on!

Last edited by toxa (2020-09-09 16:14:05)

Offline

 

#3 2020-09-10 07:09:11

Nekete
New member
Registered: 2020-08-21
Posts: 2

Re: WOW!!! SOURCE LEVEL DEBUGGING OF YOUR C CODE IN VS.CODE!

Its great smile

Thank you for the info!

Offline

 

#4 2020-10-03 20:49:05

bbbbbr
Member
Registered: 2019-03-04
Posts: 124

Re: WOW!!! SOURCE LEVEL DEBUGGING OF YOUR C CODE IN VS.CODE!

Has anyone had luck using this with VScodium on Linux?

I set it up and did the steps, but it doesn't seem to connect (or at least show a sign that it's connected). I'll try with the MS build of VScode and try some more later on, but if anyone has tips that would be helpful.

Also, with gbdk2020 4.0, what is the method for passing in --debug to sdcc if it's being called via lcc?

Last edited by bbbbbr (2020-10-03 20:52:26)

Offline

 

#5 2020-10-04 16:02:34

toxa
Member
Registered: 2020-02-13
Posts: 305

Re: WOW!!! SOURCE LEVEL DEBUGGING OF YOUR C CODE IN VS.CODE!

Code:

-Wf--debug -Wl-m -Wl-w -Wl-y

also "tools"->"remote debugging"->"enabled" in emulicious

rom and cdb file must be in the root folder of the project

also why not to use vs.code itself? https://code.visualstudio.com/docs/setup/linux

Last edited by toxa (2020-10-04 16:03:24)

Offline

 

#6 2020-10-06 19:22:10

bbbbbr
Member
Registered: 2019-03-04
Posts: 124

Re: WOW!!! SOURCE LEVEL DEBUGGING OF YOUR C CODE IN VS.CODE!

toxa wrote:

Code:

-Wf--debug -Wl-m -Wl-w -Wl-y

also "tools"->"remote debugging"->"enabled" in emulicious

rom and cdb file must be in the root folder of the project

also why not to use vs.code itself? https://code.visualstudio.com/docs/setup/linux

vscodium is vscode with Microsoft's telemetry turned off.
https://vscodium.com/

EDIT: OK, confirmed. It works fine in standard VSCode, but the extension has some dependency errors in VScodium (so it must be missing something that VSCode ships with besides the telemetry).

Last edited by bbbbbr (2020-10-06 22:59:25)

Offline

 

#7 2020-10-07 04:26:37

toxa
Member
Registered: 2020-02-13
Posts: 305

Re: WOW!!! SOURCE LEVEL DEBUGGING OF YOUR C CODE IN VS.CODE!

why not just switch off "eneble telemetry" in "online service settings"?

Offline

 

#8 2020-10-08 16:08:55

bbbbbr
Member
Registered: 2019-03-04
Posts: 124

Re: WOW!!! SOURCE LEVEL DEBUGGING OF YOUR C CODE IN VS.CODE!

There are a couple more settings to change depending on the level one wants to opt-out:
https://code.visualstudio.com/updates/v … fline-mode

Offline

 

#9 2020-10-11 06:30:15

toxa
Member
Registered: 2020-02-13
Posts: 305

Re: WOW!!! SOURCE LEVEL DEBUGGING OF YOUR C CODE IN VS.CODE!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson