PyCharm, IntelliJ & WebStorm

Installation

To utilize CtrlB from your IDE, you must first install the CtrlB IDE plugin

Version Support

The following instructions are applicable to JetBrains IDEs (PyCharm, IntelliJ IDEA, and Webstorm) version 2020.3 and later.

From JetBrains Plugin Marketplace

  • Navigate to Settings (Mac OS/ Windows/Linux) within your JetBrains IDE.

  • Proceed to the Plugins section and select the MarketPlace tab. Search for CtrlB and click Install followed by the OK button

  • CtrlB will be accessible from the left-hand Tool Window Bar where you can log in/sign up for the plugin


Basic Setup

Once you have opened the CtrlB Tool Window, a webview will open. If it's your first time using the extension, please click signup and create your login credentials.

You may utilize these credentials to log in to our plugin and advance to the final step - initiating CtrlB Agents alongside your application.


Quick Tour

Upon logging in, you'll see three separate panes. These help you manage your applications running with the Heimdall agent.

Applications Pane

The Applications Pane is the initial pane displayed post-login. It shows all your applications that are running with the Heimdall agent. To select an application for further action, such as adding a trace point, simply click on the checkbox corresponding to the application

Probes Pane

In the Probes Pane, you'll see a list of active tracepoints and logpoints. From here you can review and manage your active probes.

Snapshot Hits Pane

The Snapshot Hits Pane shows the snapshots captured by your tracepoints. Here, you can examine the trace point snapshots, and view stack-trace and captured variables.


Adding a probe

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

  • In the IDE editor, right click on the line where you want to add a probe an Editor popup menu will appear, select CtrlB -> Add TracePoint or CtrlB -> Add LogPoint.

  • A form opens up as Dialog Box in the IDE. There are some configuration options available as described below. Finally click Add TracePoint or Add LogPoint


Configuration for probe

Tracepoint

FieldDescription

Application

In this section, a dropdown will display the list of selected applications. Select the desired application where you intend to add the probe.

File name

This field is non-editable. It displays the name of the file on which you intended to add probe by opening Editor popup menu.

Line no.

This is a non-editable field indicating the specific line number in the file, providing context for the probe's location.

File hash

Another non-editable field, the File hash is crucial as it is utilized to verify the content of the respective file.

Hit limit

(In Seconds) The tracepoint would be automatically removed after being triggered these many times.

Lifetime

The tracepoint would be automatically removed after being triggered these many times.

Condition 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

Conditional Expressions:

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

Logpoint

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

FieldDescription

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.

isSTDOUTEnabled

By default this is enabled, your application will 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. You here have ability to clear the snapshots, filter them based on time and filename. 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 terminal/logs of your application.

Last updated