CtrlB
  • CtrlB Flow
    • 🖐️Introducing CtrlB Flow
    • 🏁Getting started
    • Getting data in CtrlB Flow
    • Explore your data
    • Control your data
  • CtrlB Live Debug
    • 🖐️Introducing CtrlB Live Debug
      • What can you do with CtrlB?
      • How CtrlB works?
    • 🏁Getting started in 2 minutes
    • Plugins
      • Visual Studio Code
      • PyCharm, IntelliJ & WebStorm
    • Agents
      • Python
        • Installation
        • Configuration
        • System Requirements
        • Data Redaction
        • Troubleshoot / Release Notes
          • Version 1.0
      • NodeJs
        • Installation
        • Configuration
        • System Requirements
        • Data Redaction
        • Troubleshoot / Release Notes
          • Version 1.0
      • Java
        • Installation
        • Run with IntelliJ
        • Configuration
        • System Requirements
        • Data Redaction
        • Troubleshoot / Release Notes
      • Go
        • Installation
        • Run with Goland
        • Run with Docker
        • Configuration
        • System Requirements
        • Data Redaction
    • 🎛️Conditional Expressions
    • 🏭Deploy within your firewall
    • 🍉Benchmarking impact on your system
      • Java
      • Go
    • Benchmarking impact on your system:
Powered by GitBook
On this page
  • Basic Setup
  • Signup
  • Applications Pane
  • Probes Pane
  • Snapshot Hits Pane
  • Adding a probe
  • Configuration for probe
  • View Snapshots
  • TracePoint snaphots
  • LogPoint events
  1. CtrlB Live Debug
  2. Plugins

Visual Studio Code

PreviousPluginsNextPyCharm, IntelliJ & WebStorm

Last updated 1 year ago

Basic Setup

Signup

If it's your first time using the extension, please click signup and create your login credentials.

You can use these credentials to login to our VSCode extension.

Applications Pane

Once you login you'd see these 3 panes. The first of these is Applications Pane which mentions all your applications running with the heimdall agent. Click on the checkbox here to select this application and add a trace point.

Probes Pane

Here you'd see the list of active tracepoints and logpoints.

Snapshot Hits Pane

Here you'd see the tracepoint snapshots captured by your tracepoints.

Adding a probe

  1. Select the application you want to inspect in Applications Pane.

  2. In the VScode editor, right click on the line you want to add a trace point on and select CtrlB: Add Trace Point or CtrlB: Add Log Point.

  3. A form opens up in the extension. There are some configuration options available as described below. Finally click Put Trace Point or Put Log Point

Configuration for probe

Tracepoint

  • Hit limit: The tracepoint would be automatically removed after being triggered these many times.

  • Lifetime: (in seconds). The tracepoint would be automatically removed after this much time.

  • Conditional Expression: Use this if you want the tracepoint to be triggered only when a certain condition matches. You can use the context of active variables to build conditions like: req.query.userid=="some alpha value"

Conditional Expressions:

To read more about what conditions are supported refer to the page on Conditional Expressions

Logpoint

All the config options of tracepoint are allowed in logpoint. Additionally you have the following:

  • Log Expression: The expression that you want to log. You can specify some variable that you want logged here using curly braces like: The userId is {{request.userId}}.

  • Log Level: Select the level of logging.

  • Stdout Enabled: When this is enabled, your application would have this log on its stdout.

View Snapshots

TracePoint snaphots

Click on the Snapshot Hits pane at the top. Here you would see all the tracepoint snapshots captured. Click on any captured snapshot and you will see the variables and call stack here.

LogPoint events

With the stdout enabled while setting the logpoint, you can see the dynamic logs right inside you application.

Signup
Applications Pane
Right click on a line and click CtrlB: Add Trace/Log Point
Click Put Trace Point
Tracepoint Snapshot