question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Task always launches when extension is activated

See original GitHub issue

After the most recent release, the Cortex debug extension keeps launching and revealing a task window that says “Waiting for gdb server to start…” when being activated.

If this extension is being activated on more events than the configured debug resolution event, this is very disruptive. Extensions will always be activated when an extension that depends on them is activated, so if a user has an extension installed that lists this extension in extensionDependencies, the window will pop up as soon as the other extension is activated, making integration a bit awkward.

I’d suggest moving this task launch to somewhere other than the activate function, and potentially changing the task presentation configuration to not reveal itself by default. A configuration setting to disable this behavior altogether would also be handy.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
haneefdmcommented, Aug 13, 2021

Yes, that is my bad. I left it in there but it was supposed for Debug purposes. The automatic showing of the gdb-server terminal will not be there in the next release. Thanks for reporting this. Also, this only happens once for the first session. Definitely, not every time you launch the debugger. Also, I was trying to mirror the behavior we had before where the ‘Adapter Output’ window would show itself at the very start.

And no, this window will not move from the Terminal area. It was done to support semi-hosting and there is no other suitable place. And, it needs to look like a Terminal.

About activation, nope, this extension is not activated until you launch a cortex-debug session. As disruptive as it is, we don’t do it and I don’t see it on Windows and Mac. The following is our whole activation setup in package.json and it has been that way since day one.

    "activationEvents": [
        "onDebugResolve:cortex-debug"
    ],

So, unless VSCode is doing something … I don’t see how.

0reactions
haneefdmcommented, Sep 9, 2021

@trond-snekvik, There is an update that might help your situation. Changes have been pushed to the repo if you want to try it out. Also, there is a Reset device button that you could try out – I believe this was your suggestion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Activation Events | Visual Studio Code Extension API
This activation event is emitted and interested extensions will be activated whenever a file that resolves to a certain language gets opened. ......
Read more >
Can I automatically start a task when a folder is opened?
I created an extension AutoLaunch that can run a specific task from tasks.json or launch a specific debug configuration from launch.json. Share.
Read more >
Do dynamic launch configs need extension activation? #96297
I found that, but am wondering if it's necessary We only show the debug type "folder" in select menus, and it seems like...
Read more >
Configure your Outlook add-in for event-based activation
This feature enables your add-in to run tasks based on certain events, particularly for operations that apply to every item. You can also ......
Read more >
VS Code Performance – How to Optimize Visual Studio Code ...
The * Activation Event will activate an extension when VS Code starts up. These extensions will always be active. This impacts the startup ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found