Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Add support for LogPoints in Node #163

@auchenberg

Description

@auchenberg

This is a part of a series of requests to enable "custom breakpoints" support in VS Code. See microsoft/vscode#38568

We want to light up LogPoints for the local Node debugging scenario in VS Code, so developers can get comfortable with LogPoints while debugging locally, and because we believe LogPoints will enable more people to get comfortable by using a debugger, as it's an experience that's closer to using console.log's.

Functionality

  • I imagine LogPoints can be enabled as a conditional breakpoint over CDP, where the passed expression simply is console.log(<x>) which will get evaluated in the scope of where the breakpoint hauls execution. The log message should then be surfaced in the Debug Console, as this is already working.

  • LogPoints should be set using a UX that is similar to the conditional breakpoint logic, but use a different gutter icon.

  • The expression of a LogPoint should be validated to make sure it can be executed

Asks outside of this DA:

VS code:

  1. Support an extension point for customizing gutter interaction.. Support an extension point for customizing gutter interaction. vscode#38568
  2. Visualize breakpoint types in breakpoints view to enable LogPoints to show up as LogPoints instead of a conditional breakpoint, Visualize breakpoint types in breakpoints viewlet vscode#42266

VS Code Debug Protocol

  1. Enable debug adaptors to enable/disable certain breakpoint types. Enable debug adaptors to enable/disable certain breakpoint types vscode-debugadapter-node#155

Considerations:

  1. Should we treat LogPoints as a special kind of breakpoint or something new? Do we want do introduce a Debugger.addLogPoint in CDP and move the responsibility on level deeper, or have the implementation in inside this DA? Does the Debug Protocol (DAP) need to be extended?

(@dhanvikapila, @digeff, @changsi-an, @roblourens, @weinand )

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions