Skip to content

Commit c485553

Browse files
committed
revert changes to RuntimeHelper class
1 parent 598d1e8 commit c485553

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

build-artifacts/project-template-gradle/src/main/java/com/tns/RuntimeHelper.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,15 @@ public static Runtime initRuntime(Application app) {
133133
try {
134134
v8Inspector = new AndroidJsV8Inspector(app, logger);
135135
v8Inspector.start();
136+
137+
// the following snippet is used as means to notify the VSCode extension
138+
// debugger that the debugger agent has started
139+
File debugBreakFile = new File("/data/local/tmp", app.getPackageName() + "-debugger-started");
140+
if (debugBreakFile.exists() && !debugBreakFile.isDirectory() && debugBreakFile.length() == 0) {
141+
java.io.FileWriter fileWriter = new java.io.FileWriter(debugBreakFile);
142+
fileWriter.write("started");
143+
fileWriter.close();
144+
}
136145
} catch (IOException e) {
137146
e.printStackTrace();
138147
}

test-app/app/src/main/java/com/tns/RuntimeHelper.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,15 @@ public static Runtime initRuntime(Application app) {
134134
try {
135135
v8Inspector = new AndroidJsV8Inspector(app, logger);
136136
v8Inspector.start();
137+
138+
// the following snippet is used as means to notify the VSCode extension
139+
// debugger that the debugger agent has started
140+
File debugBreakFile = new File("/data/local/tmp", app.getPackageName() + "-debugger-started");
141+
if (debugBreakFile.exists() && !debugBreakFile.isDirectory() && debugBreakFile.length() == 0) {
142+
java.io.FileWriter fileWriter = new java.io.FileWriter(debugBreakFile);
143+
fileWriter.write("started");
144+
fileWriter.close();
145+
}
137146
} catch (IOException e) {
138147
e.printStackTrace();
139148
}

0 commit comments

Comments
 (0)