Skip to content

Commit 8b22be8

Browse files
laeubijonahgraham
authored andcommitted
Allow debugging without modify the source
Currently one needs to modify and recompile the source to enable debugging, this is replaced by a system property that can be set.
1 parent 061ab96 commit 8b22be8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/spawner/ProcessFactory.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
*/
3737
public class ProcessFactory {
3838

39+
private static final boolean DEBUG = Boolean.getBoolean("org.eclipse.cdt.utils.spawner.debug"); //$NON-NLS-1$
40+
3941
static private ProcessFactory instance;
4042
private boolean hasSpawner;
4143
private Runtime runtime;
@@ -255,9 +257,9 @@ private StringBuilder debug() {
255257
}
256258

257259
public Process start() throws IOException {
258-
// Uncomment the next line, set a breakpoint in the last line of debug() method,
259-
// when the breakpoint is triggered, inspect the sb variable to see detailed info on what is being launched.
260-
// debug();
260+
if (DEBUG) {
261+
debug();
262+
}
261263
Process p;
262264
if (hasSpawner) {
263265
if (use_pty) {

0 commit comments

Comments
 (0)