Skip to content

Commit 15b053f

Browse files
committed
tmp
1 parent 242ed9f commit 15b053f

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
**/*.vsix
22
debugger/**/*.lua
3+
!debugger/**/tarantoolfuncs.lua
34
debugger/*.lua.map
45
extension/**/*.js
56
extension/**/*.js.map

debugger/debugger.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ import {Send} from "./send";
3636
import {Breakpoint} from "./breakpoint";
3737
import {Thread, mainThread, mainThreadName, isThread} from "./thread";
3838

39+
import * as tarantool from "./tarantoolfuncs";
40+
const {getsources} = tarantool.debug;
41+
3942
export interface Var {
4043
val: unknown;
4144
type: string;
@@ -509,12 +512,11 @@ export namespace Debugger {
509512
if (!path) {
510513
Send.error(`Bad expression: ${inp}`);
511514
} else {
512-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
513-
const content: string | null = tarantool_builtin_module(`@${path}`);
515+
const content: string | null = getsources(`@${path}`);
514516
if (typeof content === "string") {
515517
Send.result(content);
516518
} else {
517-
Send.error(`Nullable tarantool_builtin_module response: @${path}`);
519+
Send.error(`Nullable tarantool.debug.getsources response: @${path}`);
518520
}
519521
}
520522
} else if (inp === "autocont" || inp === "autocontinue") {

debugger/tarantool.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

debugger/tarantoolfuncs.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export type TarantoolDebug = {
2+
getsources: (filePath: string) => string | null;
3+
};
4+
5+
export const debug: TarantoolDebug;

debugger/tarantoolfuncs.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
return require 'tarantool'

0 commit comments

Comments
 (0)