NeoObjectPascal Extension for Visual Studio CodeComplete IDE support for NeoObjectPascal with syntax highlighting, interactive debugging, and unit testing. Version: 2.5.0 ✨ Features🎨 Syntax Highlighting
▶️ Run & Execute
🐛 Interactive Debugging
🧪 Unit Testing
📦 Installation
🚀 Quick StartRunning a File
Or click the ▶ play button in the editor title bar. Debugging
Debug Console CommandsWhile debugging, use these commands in the Debug Console:
Running TestsSingle Test:
All Tests:
⚙️ ConfigurationOpen VS Code settings ( Settings
|
| Shortcut | Action |
|---|---|
F5 |
Start Debugging / Continue |
Shift+F5 |
Stop Debugging |
Ctrl+Shift+F5 |
Restart Debugging |
F9 |
Toggle Breakpoint |
F10 |
Step Over |
F11 |
Step Into |
Shift+F11 |
Step Out |
💡 Examples
Example 1: Simple Program
// hello.npas
var message: String;
begin
message := "Hello from NeoObjectPascal!";
WriteLn(message);
end.
Run: Right-click → Run NeoObjectPascal File
Example 2: Class with Debugging
// person.npas
class Person
var name: String;
var age: Integer;
constructor Create(n: String, a: Integer)
begin
self.name := n;
self.age := a;
end;
public function greet(): String
begin
return "Hello, I'm " + self.name;
end;
end;
var p: Person;
var greeting: String;
begin
p := new Person("John", 30);
greeting := p.greet(); // Set breakpoint here (click line number)
WriteLn(greeting);
end.
Debug:
- Click line number to set breakpoint (red dot appears)
- Right-click → Debug NeoObjectPascal File
- Use Variables view to inspect
pandgreeting - Use Debug Console to type
p nameto see the name value
Example 3: Unit Test
// calculator.test.npas
function add(a: Integer, b: Integer): Integer
begin
return a + b;
end;
test "Should add two numbers correctly"
begin
// GIVEN
var a: Integer;
var b: Integer;
a := 10;
b := 20;
// WHEN
var result: Integer;
result := add(a, b);
// THEN
expect(result).toBe(30);
end;
Run Test: Right-click → Execute Unit Test
🔧 Troubleshooting
JAR Not Found
Problem: "JAR file not found" error
Solution:
- Check if bundled JAR exists:
<extension-path>/bin/neoobjectpascal.jar - Or configure custom JAR path in settings
- Ensure Java is installed:
java -version
Debugger Not Starting
Problem: Debug session fails to start
Solution:
- Ensure file is saved
- Check for syntax errors in your
.npasfile - Verify JAR path is correct
- Check Java installation (
java -version) - Try restarting VS Code
Tests Not Running
Problem: Tests don't execute
Solution:
- Ensure file has
.test.npasextension - Check test syntax (use
test "name" begin ... end;) - Verify JAR supports testing (
-tflag)
Breakpoints Not Working
Problem: Breakpoints are ignored
Solution:
- Ensure you're using Debug mode, not Run mode
- Check that breakpoints are on executable lines (not comments or blank lines)
- Verify the file is saved before debugging
📋 Requirements
- Visual Studio Code 1.60.0 or higher
- Java 11 or higher
📜 Release Notes
2.4.0 (Latest)
New Features:
- ✅ Record literals
#{ }, plus highlighting for boolean/error-handling/OO/testing keywords - ✅ TerminalInk highlighting + snippets (terminal UI framework)
- ✅ HTTP/API function highlighting + snippets (
httpGet/httpPost/…/httpForm) - ✅ Named java-block arguments (access args by name, not only
param0) - ✅ New extension icon
- ✅ Bundled interpreter JAR refreshed to the current build (
neoobjectpascal.jar)
See CHANGELOG.md for the full history.
2.1.0
New Features:
- ✅ Interactive debugging with breakpoints
- ✅ Variable inspection and modification
- ✅ Call stack view
- ✅ Debug console with REPL
- ✅ Unit testing support (
.test.npasfiles) - ✅ Context menus for all actions
- ✅ Bundled JAR (v2.4)
Improvements:
- Enhanced syntax highlighting for OO features
- Better error messages
- Improved terminal integration
- Separate menus for test files
1.0.0
- Initial release
- Basic syntax highlighting
- Run command
🤝 Contributing
Contributions are welcome! Please visit the GitHub repository.
📄 License
MIT License - See LICENSE file for details
👤 Author
Álvaro Brito
Enjoy coding in NeoObjectPascal with full IDE support! 🚀