Skip to content

bostelk/vscode-lobster-debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vscode-lobster-debug

vscode-lobster-debug is a visual studio code (vscode) extension to enable debugging a program written in lobster. This project is a work in progress and is incomplete at this time.

Overview

This project is composed of two subprojects: lobster-debug and vscode.

  • lobster-debug is a "concrete" debugger written in C++ that enables a development tool to interop with a lobster virtual machine/runtime.
  • vscode is a vscode extention written in typescript that can start a lobster debug session and can communicate with a debugger over DAP.

There is no existing debugger, so the debugger and adapter have been fused together. Where in other laguages they're typically seperate from each other.

Getting Started

To get started working on the extension you have a few tasks to complete first. Download and install the required software which includes: Visual Studio 2022 and Node v18. Then perform the following:

  1. Fetch additional Git repositories, generate project files, and install node modules.
git submodule update --init

cd cppdap.
cmake ..

cd ..

cd vscode
npm install
  1. Open lobster-debug soltuion in Visual Studio and add a project dependency to cppdap. This step is not necessary if the ccpdap project GUID is static.
  2. Build the lobster-debug soltuion.
  3. Open vscode folder in VS Code.
  4. Open the "Run and Debug" pannel and hit the Play button next to "Run Extension".
  5. A new VS Code window will open. Open the "samplesWorkspace" folder.
  6. Open a lobster program.
  7. Switch the Play button from "Run file" to "Debug file" and press the button.
  8. The lobster program will start paused.

You can now set a breakpoint in the source file and restart the program to debug it.

Publishing

To publish the extension open a terminal and run:

cd vscode
npm run package

A new file "lobster-debug-0.0.0.vsix" is output which can published to a marketplace or installed into vscode.