Skip to content

Command "traces.openTraceFile" - should it be available from command palette? #224

@marcdumais-work

Description

@marcdumais-work

ATM command "traces.openTraceFile" (label: "Open with Trace Viewer") is available in the command palette. However it seems to only work when triggered from the explorer's context menu, with a file selection. If triggered from the command palette, it seems to always fail, even if one selects the file before invocation. Should it even be available from the command palette?

The error message is rather cryptic too:

image

Maybe we could register the command using the "when" clause and use contexts to make it available only when appropriate. Here are some contexts that could potentially be used, with example values, when a trace file is selected in the explorer:

"focusedView": "workbench.explorer.fileView",
"workbench.explorer.fileView.active": true,
"resource": "file:///home/user/TraceCompassTutorialTraces/303-jaeger-opentracing-traces/donutJaegerTrace.json",
"resourceScheme": "file",
"resourceFilename": "donutJaegerTrace.json",
"workbench.explorer.fileView.active": true,
"explorerResourceIsFolder": false,
"filesExplorerFocus": true,

Failing that, we could at least adjust the error message to say how that command should be triggered?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions