flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > Debug FASM with VS Code

Author
Thread Post new topic Reply to topic
KIRK



Joined: 05 Dec 2007
Posts: 20
Location: Russia
KIRK 10 Jul 2022, 08:39
VS Code is probably one of the most convenient code editors, it would be cool to make an extension for debugging applications on FASM or use an existing extension and somehow tweak it to generate and use a .fas debug file.

Some links I have already found:

CodeLLDB
https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb

Native Debug (GDB, LLDB support)
https://marketplace.visualstudio.com/items?itemName=webfreak.debug

MASM/TASM (works via DOSBox)
https://marketplace.visualstudio.com/items?itemName=xsro.masm-tasm

Symbolic/debug information
https://board.flatassembler.net/topic.php?t=9792

OLLY plugin which adds FASM debug info
https://board.flatassembler.net/topic.php?p=114370

My debugging symbols solution
https://board.flatassembler.net/topic.php?p=149572#149572

Adding windows debug info into .obj file generated fasm
https://board.flatassembler.net/topic.php?p=89369

VS Code Launch Configuration
https://code.visualstudio.com/docs/editor/debugging#_launch-configurations


Last edited by KIRK on 10 Jul 2022, 18:42; edited 6 times in total
Post 10 Jul 2022, 08:39
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1847
Roman 10 Jul 2022, 08:50
Nice write json highlightings syntax fasm.
I try do this in vs code.

I find vim macro cool feature.
https://www.youtube.com/watch?v=3lmsPScLHb0


Last edited by Roman on 10 Jul 2022, 09:48; edited 1 time in total
Post 10 Jul 2022, 08:50
View user's profile Send private message Reply with quote
KIRK



Joined: 05 Dec 2007
Posts: 20
Location: Russia
KIRK 10 Jul 2022, 09:46
These are my settings for CodeLLDB.

Steps:
- add settings below
- open your asm file
- add int3 instruction at the beginning
- press F5 twice for x86, once for x64

Sample file:
Code:
format PE64 GUI
; format PE GUI 4.0
; include 'win32a.inc'
entry @start

@start:
        int3
        mov eax, 3
        ret
    


.vscode/launch.json
Code:
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "lldb",
      "request": "launch",
      "name": "Debug",
      "cwd": "${fileDirname}",
      "program": "${fileBasenameNoExtension}.exe",
      "preLaunchTask": "Сompile",
      "args": [],
    }
  ]
}
    


.vscode/tasks.json
Code:
{
  "version": "2.0.0",
  "tasks": [{
      "type": "process",
      "label": "Сompile",
      "command": "C:/FASM/FASM.EXE",
      "options": {
        "cwd": "${fileDirname}"
      },
      "args": ["${file}", "${fileBasenameNoExtension}.exe"]
  }]
}
    


settings.json
Code:
"terminal.integrated.env.windows": {
  "INCLUDE": "C:/FASM/INCLUDE",
}
    
Post 10 Jul 2022, 09:46
View user's profile Send private message Reply with quote
KIRK



Joined: 05 Dec 2007
Posts: 20
Location: Russia
KIRK 10 Jul 2022, 11:55
Run with custom debugger:

"F5 Anything" extension
https://marketplace.visualstudio.com/items?itemName=discretegames.f5anything

.vscode/launch.json
Code:
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug with OllyDbg",
      "type": "f5anything",
      "request": "launch",
      "command": "\"C:/OllyDbg/ollydbg.exe\" \"${fileDirname}/${fileBasenameNoExtension}.exe\"",
      "preLaunchTask": "Сompile",
    }
  ]
}
    
Post 10 Jul 2022, 11:55
View user's profile Send private message Reply with quote
fuct



Joined: 30 Nov 2021
Posts: 2
fuct 30 Nov 2024, 21:36
I read on StackOverflow that you can use RetroAssembler to develop FASM in VSCode; simply choose the compiler for building. However, this is not an officially supported feature. There are a couple of other FASM syntax highlighting plugins, but none of them are actively maintained - just highlighting only.

Would love to see a supported plugin, even if it's just basic features (build/highlighting). Unfortunately, I don't have the bandwidth to take on another side project.

https://marketplace.visualstudio.com/items?itemName=EngineDesigns.retroassembler

What do you all use for a decent IDE, fresh?
Post 30 Nov 2024, 21:36
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1671
Location: Toronto, Canada
AsmGuru62 01 Dec 2024, 01:21
I use my own IDE I coded in 2009.
I have colored syntax, tooltips, code completion, code fragments database, etc.
Post 01 Dec 2024, 01:21
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.