File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ This project consists of a c++ part that is compiled with the game and runs with
99# Prerequisites
1010
11111 ) [ Install VSCode] ( https://code.visualstudio.com )
12- 2 ) Install the [ ` LRDB ` (Lua Remote Debugger) extension] ( https://marketplace.visualstudio.com/items?itemName=satoren .lrdb ) for VScode
12+ 2 ) Install the [ ` LRDB ` (Lua Remote Debugger) extension] ( https://marketplace.visualstudio.com/items?itemName=beamng .lrdb-beamng ) for VScode
1313
1414# Quickstart
1515
16161 ) Open game folder in VScode as workspace: ` File ` > ` Open Folder... ` > ` <select game folder> `
17172 ) Place breakpoints in your Lua files. (Highlight a line and press ` F9 ` )
18- 3 ) Start the game separatly with the command line arguments
18+ 3 ) Start the game separately with the command line arguments (case sensitive!)
1919 ` -luadebug -attachOnStart ` - The game will hang and wait for VScode to connect.
20204 ) Press ` F5 ` in VScode (Launch in VScode to attach to the game).
2121
@@ -118,4 +118,4 @@ Run: `extensions.test_debugger.test()`
118118
119119The debugger is based on [ LRDB-0.3.1] ( https://github.com/satoren/LRDB ) but with heavy modifications for compatiblity and speed.
120120
121- See [ LICENSE_1_0.txt] ( LICENSE_1_0.txt )
121+ See [ LICENSE_1_0.txt] ( LICENSE_1_0.txt )
Original file line number Diff line number Diff line change 99} from './JsonRpc'
1010
1111export type DebugRequest =
12+ | InitRequest
1213 | StepRequest
1314 | StepInRequest
1415 | StepOutRequest
@@ -84,6 +85,16 @@ export class Client {
8485 } )
8586 }
8687
88+ init = (
89+ params : InitRequest [ 'params' ]
90+ ) : Promise < DebugResponseType < InitRequest > > =>
91+ this . send ( {
92+ method : 'init' ,
93+ jsonrpc : '2.0' ,
94+ id : this . seqId ++ ,
95+ params,
96+ } )
97+
8798 step = ( ) : Promise < DebugResponseType < StepRequest > > =>
8899 this . send ( { method : 'step' , jsonrpc : '2.0' , id : this . seqId ++ } )
89100 stepIn = ( ) : Promise < DebugResponseType < StepInRequest > > =>
@@ -209,6 +220,12 @@ export interface RunningNotify extends JsonRpcNotify {
209220 params ?: never
210221}
211222
223+ export interface InitRequest extends JsonRpcRequest {
224+ method : 'init'
225+ params : {
226+ protocol_version : string
227+ }
228+ }
212229interface StepRequest extends JsonRpcRequest {
213230 method : 'step'
214231 params ?: never
@@ -310,6 +327,7 @@ type Breakpoint = {
310327}
311328
312329type ResponseResultType = {
330+ init : never
313331 get_stacktrace : StackInfo [ ]
314332 get_local_variable : Record < string , unknown >
315333 get_upvalues : Record < string , unknown >
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { LuaInstancesTreeViewProvider } from './luaInstancesTreeViewProvider'
99// The compile time flag 'runMode' controls how the debug adapter is run.
1010// Please note: the test suite only supports 'external' mode.
1111// 'inline' mode is great for debugging.
12- const runMode : 'external' | 'server' | 'inline' = 'external '
12+ const runMode : 'external' | 'server' | 'inline' = 'server '
1313
1414export function activate ( context : vscode . ExtensionContext ) : void {
1515
You can’t perform that action at this time.
0 commit comments