VS Code Based IDE Integration
Este conteúdo não está disponível em sua língua ainda.
Also works with Cursor and Windsurf!
This guide applies to VS Code, Cursor, and Windsurf - they all use the same extension since they’re built on VS Code.
Installation
Section titled “Installation”- Open Extensions (Ctrl+Shift+X)
- Search for “GalataJ”
- Click Install
Requirements
- VS Code 1.80 or later
- Java JDK 11+ for your application
Start Profiling
Section titled “Start Profiling”- Run your Java application
- Open Command Palette (Ctrl+Shift+P)
- Run “GalataJ: Start Profiling”
- Select the JVM from the list
The extension automatically handles everything:
- ✅ Starts the controller
- ✅ Discovers running JVMs
- ✅ Attaches the profiler agent
View Inline Metrics
Section titled “View Inline Metrics”Performance metrics appear directly above your methods:
Metrics shown:
- Execution time - Average and max time
- Call count - Number of invocations
- Memory - Allocations per call
- Trend - Performance change indicator
Hover for Details
Section titled “Hover for Details”Hover over any method to see detailed metrics:
GalataJ Panel
Section titled “GalataJ Panel”Click the GalataJ icon in the sidebar to open the panel:
Panel features:
- View all profiled methods
- Sort by execution time, call count, or trend
- Filter by package or class
- Click to navigate to method source
- Connection status indicator
Stop Profiling
Section titled “Stop Profiling”Open Command Palette (Ctrl+Shift+P) and run “GalataJ: Stop Profiling”.
Understanding Metrics
Section titled “Understanding Metrics”Execution Time
Avg = cumulative average since profiling started
Max = highest time in recent window
Trend
↑ Positive = getting slower
↓ Negative = getting faster
Call Count
Total invocations since profiling started
Allocations
Memory allocated per method call
Extension Settings
Section titled “Extension Settings”Open File → Preferences → Settings and search for “GalataJ”:
| Setting | Description |
|---|---|
galataj.cliPath | Path to CLI (if not in PATH) |
galataj.autoStart | Auto-start controller |
galataj.showInlineHints | Enable/disable inline hints |
Troubleshooting
Section titled “Troubleshooting”JVM Not Showing Up?
Make sure your Java application is running, then try “GalataJ: Refresh JVMs” from Command Palette. If it still doesn’t appear, run galataj doctor in terminal.
| Issue | Solution |
|---|---|
| No metrics appearing | Check status bar shows “GalataJ: Connected” |
| Metrics not updating | Try “GalataJ: Restart Profiling” |
| Extension not activating | Reload VS Code window |
For more help, see Troubleshooting Guide.
Next Steps
Section titled “Next Steps”- IntelliJ Integration - Use GalataJ in IntelliJ
- Docker Profiling - Profile containerized apps
- Configuration - Customize settings