Skip to content

Commit d11229e

Browse files
v0.1.4
1 parent 5b1f133 commit d11229e

15 files changed

Lines changed: 515 additions & 341 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ chrono = { version = "0.4", features = ["serde"] }
3636
fuzzy-matcher = "0.3"
3737

3838
# Validation system dependencies
39-
raz-validation = { path = "raz-validation", version = "0.1.3" }
39+
raz-validation = { path = "raz-validation", version = "0.1.4" }
4040

4141
[profile.release]
4242
opt-level = 3

raz-adapters/cli/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "raz-cli"
3-
version = "0.1.3"
3+
version = "0.1.4"
44
edition = "2024"
55
description = "Universal command runner for Rust - Run any Rust file from anywhere with cursor-aware test targeting and override persistence"
66
license = "MIT"
@@ -18,10 +18,10 @@ name = "raz"
1818
path = "src/main.rs"
1919

2020
[dependencies]
21-
raz-common = { path = "../../raz-common", version = "0.1.3" }
22-
raz-core = { path = "../../raz-core", version = "0.1.3" }
23-
raz-config = { path = "../../raz-config", version = "0.1.3" }
24-
raz-override = { path = "../../raz-override", version = "0.1.3" }
21+
raz-common = { path = "../../raz-common", version = "0.1.4" }
22+
raz-core = { path = "../../raz-core", version = "0.1.4" }
23+
raz-config = { path = "../../raz-config", version = "0.1.4" }
24+
raz-override = { path = "../../raz-override", version = "0.1.4" }
2525
clap = { workspace = true }
2626
tokio = { workspace = true }
2727
serde_json = { workspace = true }

raz-adapters/vscode/CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Changelog
2+
3+
All notable changes to the RAZ VS Code extension will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.4-pre] - 2025-01-05 (Pre-release)
9+
10+
### 🐛 Added - Intelligent Debugging Integration
11+
12+
- **Breakpoint-Driven Debugging**: Automatic detection of breakpoints in symbol ranges
13+
- **Seamless rust-analyzer Integration**: Uses rust-analyzer's debug codelens when breakpoints are detected
14+
- **Smart Mode Switching**: Automatically switches between debug and run modes based on breakpoint presence
15+
- **Symbol-Aware Detection**: Intelligently finds the most relevant symbol at cursor position
16+
- **Zero Configuration**: No debug setup required - just set breakpoints and run
17+
18+
### 🔧 New Features
19+
20+
- **New Commands**:
21+
- `raz.toggleBreakpointDetection` - Toggle automatic breakpoint detection
22+
- `raz.showDebugInfo` - Show debugging information for current cursor position
23+
- **New Configuration Options**:
24+
- `raz.enableBreakpointDetection` - Enable/disable breakpoint detection (default: true)
25+
- `raz.useRustAnalyzerCodeLens` - Use rust-analyzer codelens for debugging (default: true)
26+
- `raz.prioritySymbolKinds` - Configure symbol types for debugging context
27+
- `raz.logLevel` - Set logging level for debugging features
28+
29+
### 🚀 Improvements
30+
31+
- **Enhanced User Experience**: Single `Cmd+R` now intelligently chooses between debug and run modes
32+
- **Performance**: Fast RAZ execution when no breakpoints are present
33+
- **Reliability**: Fallback to RAZ execution if rust-analyzer debugging fails
34+
- **Symbol Priority**: Configurable symbol type priorities for better context detection
35+
36+
### 🧠 Technical Details
37+
38+
- Implemented breakpoint range detection using VSCode's debugging API
39+
- Added symbol traversal with priority-based filtering
40+
- Integrated with rust-analyzer's codelens system for debugging
41+
- Added comprehensive error handling and fallback mechanisms
42+
43+
### 📚 Documentation
44+
45+
- Updated README.md with debugging integration documentation
46+
- Enhanced INSTALL.md with debugging setup instructions
47+
- Added configuration examples for debugging features
48+
49+
## [0.1.3] - Previous Release
50+
51+
### Features
52+
- Override system with deferred save mechanism
53+
- Task runner integration
54+
- Cross-IDE override persistence
55+
- Smart test detection
56+
- Framework-aware command generation
57+
58+
## [0.1.2] - Previous Release
59+
60+
### Features
61+
- Basic command execution
62+
- Binary management
63+
- Configuration system
64+
65+
## [0.1.1] - Previous Release
66+
67+
### Features
68+
- Initial VS Code extension release
69+
- Basic Rust file execution
70+
71+
---
72+
73+
For more details, see the [README.md](README.md) and [project repository](https://github.com/codeitlikemiley/raz).

raz-adapters/vscode/INSTALL.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ npm run vscode:prepublish
4242
vsce package
4343
```
4444

45-
This creates a `.vsix` file (e.g., `raz-vscode-0.1.0.vsix`) in the vscode directory.
45+
This creates a `.vsix` file (e.g., `raz-vscode-0.1.4.vsix`) in the vscode directory.
4646

4747
## Installing the Extension
4848

@@ -51,14 +51,14 @@ This creates a `.vsix` file (e.g., `raz-vscode-0.1.0.vsix`) in the vscode direct
5151
1. Open VS Code
5252
2. Press `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux)
5353
3. Type: `Extensions: Install from VSIX...`
54-
4. Navigate to and select: `/path/to/raz/raz-adapters/vscode/raz-vscode-0.1.0.vsix`
54+
4. Navigate to and select: `/path/to/raz/raz-adapters/vscode/raz-vscode-0.1.4.vsix`
5555
5. Click "Install"
5656
6. Reload VS Code when prompted
5757

5858
### Method 2: Using Command Line
5959

6060
```bash
61-
code --install-extension /path/to/raz/raz-adapters/vscode/raz-vscode-0.1.0.vsix
61+
code --install-extension /path/to/raz/raz-adapters/vscode/raz-vscode-0.1.4.vsix
6262
```
6363

6464
### Method 3: Using Extensions View
@@ -79,6 +79,12 @@ code --install-extension /path/to/raz/raz-adapters/vscode/raz-vscode-0.1.0.vsix
7979
- Open any `.rs` file
8080
- Press `Cmd+R` (Mac) or `Ctrl+R` (Windows/Linux)
8181
- RAZ should analyze the file and run the appropriate command
82+
83+
3. **Test Debugging Integration**
84+
- Open a Rust file with a test function
85+
- Set a breakpoint by clicking in the gutter
86+
- Press `Cmd+R` - should automatically enter debug mode
87+
- Remove breakpoint and press `Cmd+R` - should use fast execution
8288

8389
## Uninstalling
8490

@@ -144,4 +150,8 @@ After installation, configure the extension:
144150
2. Search for "raz"
145151
3. Available settings:
146152
- `raz.showOutput`: Show output in terminal (default: true)
147-
- `raz.useTaskRunner`: Use VS Code tasks for better concurrency (default: true)
153+
- `raz.useTaskRunner`: Use VS Code tasks for better concurrency (default: true)
154+
- `raz.enableBreakpointDetection`: Enable automatic debugging when breakpoints are detected (default: true)
155+
- `raz.useRustAnalyzerCodeLens`: Use rust-analyzer codelens for debugging (default: true)
156+
- `raz.prioritySymbolKinds`: Symbol types to prioritize for debugging context
157+
- `raz.logLevel`: Logging level for debugging features

raz-adapters/vscode/README.md

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- **Framework Aware**: Specialized commands for Leptos, Dioxus, Tauri, Bevy, Yew, and more
1616
- **Task Runner Support**: Run multiple commands concurrently using VS Code's task system
1717
- **🔥 Cross-IDE Override Persistence**: Save overrides in VS Code, use them in terminal, Vim, IntelliJ, or anywhere!
18-
- **🐛 Intelligent Debugging**: Automatic LLDB integration with breakpoint detection and debug mode switching
18+
- **🐛 Intelligent Debugging**: Automatic rust-analyzer debug integration with breakpoint detection and seamless debug/run mode switching
1919
- **Zero Configuration**: Works immediately without any setup
2020

2121
## Usage
@@ -26,18 +26,27 @@
2626
2. Press **Cmd+R** (Mac) or **Ctrl+R** (Windows/Linux)
2727
3. RAZ will:
2828
- Detect the file type and project context
29-
- Generate appropriate commands
29+
- **Check for breakpoints** in the current symbol's range
3030
- **Automatically switch to debug mode** if breakpoints are detected
31-
- Execute the top priority command automatically
31+
- Use rust-analyzer's debug codelens for debugging or fallback to RAZ execution
3232

33-
### Debug Mode (Cmd+Shift+D)
33+
### Intelligent Debugging (Automatic)
3434

35-
1. Set breakpoints in your Rust code
36-
2. Press **Cmd+Shift+D** (Mac) or **Ctrl+Shift+D** (Windows/Linux) to force debug mode
37-
3. RAZ will:
38-
- Build your code in debug mode
39-
- Launch CodeLLDB debugger
40-
- Stop at your breakpoints for inspection
35+
RAZ v0.1.4 introduces **breakpoint-driven debugging** that seamlessly integrates with rust-analyzer:
36+
37+
1. **Set breakpoints** in your Rust code by clicking in the gutter
38+
2. **Press Cmd+R** as normal - RAZ automatically detects breakpoints
39+
3. **Debug mode activates** when breakpoints are found in the current symbol
40+
4. **Run mode** is used when no breakpoints are present
41+
42+
#### How It Works
43+
44+
- **Symbol Detection**: RAZ finds the symbol at your cursor position
45+
- **Breakpoint Scanning**: Checks for breakpoints within that symbol's range
46+
- **Smart Switching**:
47+
-**Breakpoints found** → Executes rust-analyzer's "Debug" codelens command
48+
-**No breakpoints** → Uses fast RAZ execution
49+
- **Zero Configuration**: Leverages existing rust-analyzer + CodeLLDB setup
4150

4251
### Override Usage (Cmd+Shift+R)
4352

@@ -94,6 +103,8 @@ To see all available commands:
94103
Additional commands available through the Command Palette:
95104
- **"RAZ: Open RAZ Settings"**: Open VS Code settings for RAZ
96105
- **"RAZ: Setup RAZ Binary"**: Guided setup for RAZ binary installation
106+
- **"RAZ: Toggle Breakpoint Detection"**: Enable/disable automatic breakpoint detection
107+
- **"RAZ: Show Debug Info"**: Show debugging information for current cursor position
97108

98109
## Override Persistence with Deferred Save
99110

@@ -151,8 +162,8 @@ For CLI-based management, see the [Override Management Guide](https://github.com
151162
// Use VS Code tasks for better concurrency (default: true)
152163
"raz.useTaskRunner": true,
153164

154-
// Automatically start debugging when breakpoints are detected (default: true)
155-
"raz.autoDebugOnBreakpoints": true,
165+
// Enable automatic breakpoint detection for debugging (default: true)
166+
"raz.enableBreakpointDetection": true,
156167

157168
// Custom path to RAZ binary (optional)
158169
// If not set, the extension will automatically download and manage the binary
@@ -169,14 +180,15 @@ RAZ automatically downloads and manages the binary for your platform:
169180
- **Custom Path**: Set `raz.path` to use your own RAZ installation
170181
- **Lightweight Extension**: No bundled binaries - smaller download size
171182

172-
### Debugging Requirements
183+
### Debugging Integration
173184

174-
For debugging support, RAZ integrates with CodeLLDB:
185+
RAZ v0.1.4 seamlessly integrates with rust-analyzer and CodeLLDB for debugging:
175186

176-
- **CodeLLDB Extension**: Automatically installs `vadimcn.vscode-lldb` as a dependency
177-
- **Debug Configuration**: RAZ automatically creates debug configurations for your Rust binaries
178-
- **Breakpoint Detection**: Automatically switches to debug mode when breakpoints are present
179-
- **Test Debugging**: Supports debugging individual tests, benchmarks, and examples
187+
- **Direct Codelens Execution**: Simply executes rust-analyzer's "Debug" codelens command when breakpoints are found
188+
- **Automatic Detection**: Detects breakpoints within symbol ranges automatically
189+
- **Zero Configuration**: Leverages your existing rust-analyzer + CodeLLDB setup
190+
- **Fallback Support**: Falls back to fast RAZ execution when no breakpoints are detected
191+
- **Extension Dependencies**: Automatically installs rust-analyzer and CodeLLDB extensions
180192

181193
## Common Overrides
182194

@@ -206,10 +218,11 @@ For debugging support, RAZ integrates with CodeLLDB:
206218
Place your cursor on a test function and press Cmd+R:
207219
```rust
208220
#[test]
209-
fn test_auth() { // <- Cursor here + Cmd+R
210-
assert!(true);
221+
fn test_auth() { // <- Cursor here + Cmd+R + Breakpoint = Debug mode!
222+
assert!(true); // <- Set breakpoint here for automatic debugging
211223
}
212-
// Executes: cargo test -- tests::test_auth --exact
224+
// Without breakpoints: cargo test -- tests::test_auth --exact
225+
// With breakpoints: rust-analyzer debug mode with full debugging support
213226
```
214227

215228
### Running Binaries
@@ -282,7 +295,7 @@ See [INSTALL.md](INSTALL.md) for detailed installation instructions.
282295
```
283296
4. Install the extension:
284297
```bash
285-
code --install-extension raz-vscode-0.1.3.vsix
298+
code --install-extension raz-vscode-0.1.4.vsix
286299
```
287300

288301
### For Development/Contributing
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# RAZ VS Code Extension v0.1.4-pre Release Notes
2+
3+
## 🚨 Pre-release Version
4+
5+
This is a **pre-release** version to test the new features, especially the binary auto-download functionality. Please report any issues at [GitHub Issues](https://github.com/codeitlikemiley/raz/issues).
6+
7+
## 🎯 Highlights
8+
9+
### 🐛 Intelligent Debugging Integration (NEW!)
10+
- **Automatic Breakpoint Detection**: Set a breakpoint and press `Cmd+R` - RAZ automatically switches to debug mode
11+
- **Seamless Mode Switching**: No breakpoints? Get instant RAZ execution. With breakpoints? Launch the debugger
12+
- **Zero Configuration**: Works out of the box with rust-analyzer and CodeLLDB
13+
- **Opt-in Feature**: Can be disabled via `raz.enableBreakpointDetection` setting
14+
15+
### 📦 Binary Auto-Download (NEEDS TESTING!)
16+
- **Automatic Platform Detection**: Downloads the correct binary for your OS and architecture
17+
- **No Manual Setup**: Extension manages RAZ binary installation automatically
18+
- **Fallback Options**: Can still use system-installed RAZ or custom binary path
19+
- **Lightweight Extension**: No bundled binaries means smaller download size
20+
21+
### 🔧 Enhanced Features
22+
- **Task Runner Integration**: Better concurrency with VS Code's task system
23+
- **Override Persistence**: Save custom command configurations that persist across sessions
24+
- **Deferred Save**: Overrides only saved after successful execution
25+
- **Extension Dependencies**: Automatically installs rust-analyzer and CodeLLDB
26+
27+
## 📋 Testing Checklist for Pre-release
28+
29+
Please help test these features:
30+
31+
### Binary Auto-Download
32+
- [ ] Extension downloads binary on first use
33+
- [ ] Platform detection works correctly (Linux/macOS/Windows)
34+
- [ ] Binary has correct permissions
35+
- [ ] Fallback to system RAZ works
36+
- [ ] Custom binary path setting works
37+
38+
### Debugging Integration
39+
- [ ] Breakpoint detection works inside functions
40+
- [ ] Debug mode launches with breakpoints
41+
- [ ] Run mode executes without breakpoints
42+
- [ ] Cursor position detection is accurate
43+
- [ ] Works with tests, benchmarks, and regular functions
44+
45+
### General Functionality
46+
- [ ] `Cmd+R` executes correctly
47+
- [ ] `Cmd+Shift+R` shows override dialog
48+
- [ ] Task runner executes commands
49+
- [ ] Override persistence works
50+
- [ ] Error messages are helpful
51+
52+
## 🔄 Upgrade Instructions
53+
54+
1. **Backup your settings** if you have custom RAZ configurations
55+
2. **Uninstall previous version** (optional but recommended)
56+
3. **Install pre-release**:
57+
```bash
58+
code --install-extension raz-vscode-0.1.4.vsix
59+
```
60+
4. **Test the features** and report issues
61+
62+
## ⚙️ Configuration
63+
64+
### New Settings
65+
```json
66+
{
67+
// Enable automatic debugging when breakpoints detected (default: true)
68+
"raz.enableBreakpointDetection": true,
69+
70+
// Path to RAZ binary (leave empty for auto-download)
71+
"raz.path": "",
72+
73+
// Use VS Code tasks for better concurrency (default: true)
74+
"raz.useTaskRunner": true,
75+
76+
// Show output in terminal (default: true)
77+
"raz.showOutput": true
78+
}
79+
```
80+
81+
## 🐞 Known Issues
82+
83+
1. **Binary auto-download not tested in production** - This is why it's a pre-release
84+
2. **Debugging may not work outside functions** - By design, but may be confusing
85+
3. **Some codelens edge cases** - Complex macro-generated tests might not detect properly
86+
87+
## 📝 Feedback
88+
89+
Please report issues with:
90+
- Your OS and architecture
91+
- VS Code version
92+
- Rust toolchain version
93+
- Specific error messages
94+
- Steps to reproduce
95+
96+
Report at: https://github.com/codeitlikemiley/raz/issues
97+
98+
## 🙏 Thank You
99+
100+
Thank you for testing the pre-release! Your feedback helps make RAZ better for everyone.
101+
102+
---
103+
104+
**Note**: Once testing is complete and issues are resolved, we'll release the stable v0.1.4.

0 commit comments

Comments
 (0)