Skip to content

Commit 5bac075

Browse files
refine the debug trace (#440)
1 parent a5bbebc commit 5bac075

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/AttachRequestHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public CompletableFuture<Response> handle(Command command, Arguments arguments,
6464

6565
Map<String, Object> traceInfo = new HashMap<>();
6666
traceInfo.put("localAttach", context.isLocalDebugging());
67+
traceInfo.put("asyncJDWP", context.asyncJDWP());
6768

6869
IVirtualMachineManagerProvider vmProvider = context.getProvider(IVirtualMachineManagerProvider.class);
6970
vmHandler.setVmProvider(vmProvider);

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/ConfigurationDoneRequestHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ public List<Command> getTargetCommands() {
5555
public CompletableFuture<Response> handle(Command command, Arguments arguments, Response response, IDebugAdapterContext context) {
5656
IDebugSession debugSession = context.getDebugSession();
5757
vmHandler.setVmProvider(context.getProvider(IVirtualMachineManagerProvider.class));
58-
UsageDataSession.recordInfo("asyncJDWP", context.asyncJDWP());
5958
if (debugSession != null) {
6059
// This is a global event handler to handle the JDI Event from Virtual Machine.
6160
debugSession.getEventHub().events().subscribe(debugEvent -> {

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/LaunchRequestHandler.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import com.microsoft.java.debug.core.DebugUtility;
4343
import com.microsoft.java.debug.core.IDebugSession;
4444
import com.microsoft.java.debug.core.LaunchException;
45+
import com.microsoft.java.debug.core.UsageDataSession;
4546
import com.microsoft.java.debug.core.adapter.AdapterUtils;
4647
import com.microsoft.java.debug.core.adapter.ErrorCode;
4748
import com.microsoft.java.debug.core.adapter.IDebugAdapterContext;
@@ -76,6 +77,12 @@ public List<Command> getTargetCommands() {
7677
@Override
7778
public CompletableFuture<Response> handle(Command command, Arguments arguments, Response response, IDebugAdapterContext context) {
7879
LaunchArguments launchArguments = (LaunchArguments) arguments;
80+
Map<String, Object> traceInfo = new HashMap<>();
81+
traceInfo.put("asyncJDWP", context.asyncJDWP());
82+
traceInfo.put("noDebug", launchArguments.noDebug);
83+
traceInfo.put("console", launchArguments.console);
84+
UsageDataSession.recordInfo("launch debug info", traceInfo);
85+
7986
activeLaunchHandler = launchArguments.noDebug ? new LaunchWithoutDebuggingDelegate((daContext) -> handleTerminatedEvent(daContext))
8087
: new LaunchWithDebuggingDelegate();
8188
return handleLaunchCommand(arguments, response, context);

0 commit comments

Comments
 (0)