From 53094664c2d9c2d90bd0c28c77667d8dea884911 Mon Sep 17 00:00:00 2001 From: Steven Robbins Date: Thu, 20 Jun 2019 07:05:18 +0100 Subject: [PATCH] Added AwaitDebuggerOnNextExecution method --- ClearScript/V8/V8ScriptEngine.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ClearScript/V8/V8ScriptEngine.cs b/ClearScript/V8/V8ScriptEngine.cs index 1d5847234..8a12e6cb1 100644 --- a/ClearScript/V8/V8ScriptEngine.cs +++ b/ClearScript/V8/V8ScriptEngine.cs @@ -692,6 +692,19 @@ public void CollectCpuProfileSample() proxy.CollectCpuProfileSample(); } + /// + /// Specifies that the script engine is to wait for a debugger connection and schedule a + /// pause before executing the next application script. This method is + /// ignored if is not specified. + /// + public void AwaitDebuggerOnNextExecution() + { + if (engineFlags.HasFlag(V8ScriptEngineFlags.EnableDebugging)) + { + awaitDebuggerAndPause = true; + } + } + /// /// Gets or sets the time interval between automatic CPU profile samples, in microseconds. /// @@ -713,7 +726,6 @@ public uint CpuProfileSampleInterval proxy.CpuProfileSampleInterval = value; } } - #endregion #region internal members