Skip to content

Commit e4d3e4b

Browse files
DROP-I Base Version
1 parent 1556f49 commit e4d3e4b

44 files changed

Lines changed: 4070 additions & 130 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish VS Code Extension on Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
# Step 1: Check out the repository
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
# Step 2: Set up Node.js (required for vsce)
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '18' # specify the Node.js version compatible with your project
21+
22+
# Step 3: Install dependencies
23+
- name: Install dependencies
24+
run: npm install
25+
26+
# Step 4: Package and publish the extension using vsce
27+
- name: Publish Extension
28+
env:
29+
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
30+
run: |
31+
npm install -g @vscode/vsce
32+
vsce package
33+
vsce publish || exit 1 # Fail the workflow if publish fails
34+
35+
# Step 5: Update Release Notes (optional)
36+
- name: Update release to published
37+
if: success()
38+
uses: actions/github-script@v6
39+
with:
40+
script: |
41+
const { context, github } = require('@actions/github');
42+
await github.rest.repos.updateRelease({
43+
owner: context.repo.owner,
44+
repo: context.repo.repo,
45+
release_id: context.payload.release.id,
46+
draft: false, # Make it a published release only if the workflow succeeds
47+
prerelease: false
48+
});

.gitignore

Lines changed: 2 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,4 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
.pnpm-debug.log*
9-
10-
# Diagnostic reports (https://nodejs.org/api/report.html)
11-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12-
13-
# Runtime data
14-
pids
15-
*.pid
16-
*.seed
17-
*.pid.lock
18-
19-
# Directory for instrumented libs generated by jscoverage/JSCover
20-
lib-cov
21-
22-
# Coverage directory used by tools like istanbul
23-
coverage
24-
*.lcov
25-
26-
# nyc test coverage
27-
.nyc_output
28-
29-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30-
.grunt
31-
32-
# Bower dependency directory (https://bower.io/)
33-
bower_components
34-
35-
# node-waf configuration
36-
.lock-wscript
37-
38-
# Compiled binary addons (https://nodejs.org/api/addons.html)
39-
build/Release
40-
41-
# Dependency directories
421
node_modules/
43-
jspm_packages/
44-
45-
# Snowpack dependency directory (https://snowpack.dev/)
46-
web_modules/
47-
48-
# TypeScript cache
49-
*.tsbuildinfo
50-
51-
# Optional npm cache directory
52-
.npm
53-
54-
# Optional eslint cache
55-
.eslintcache
56-
57-
# Optional stylelint cache
58-
.stylelintcache
59-
60-
# Microbundle cache
61-
.rpt2_cache/
62-
.rts2_cache_cjs/
63-
.rts2_cache_es/
64-
.rts2_cache_umd/
65-
66-
# Optional REPL history
67-
.node_repl_history
68-
69-
# Output of 'npm pack'
70-
*.tgz
71-
72-
# Yarn Integrity file
73-
.yarn-integrity
74-
75-
# dotenv environment variable files
76-
.env
77-
.env.development.local
78-
.env.test.local
79-
.env.production.local
80-
.env.local
81-
82-
# parcel-bundler cache (https://parceljs.org/)
83-
.cache
84-
.parcel-cache
85-
86-
# Next.js build output
87-
.next
882
out
89-
90-
# Nuxt.js build / generate output
91-
.nuxt
92-
dist
93-
94-
# Gatsby files
95-
.cache/
96-
# Comment in the public line in if your project uses Gatsby and not Next.js
97-
# https://nextjs.org/blog/next-9-1#public-directory-support
98-
# public
99-
100-
# vuepress build output
101-
.vuepress/dist
102-
103-
# vuepress v2.x temp and cache directory
104-
.temp
105-
.cache
106-
107-
# Docusaurus cache and generated files
108-
.docusaurus
109-
110-
# Serverless directories
111-
.serverless/
112-
113-
# FuseBox cache
114-
.fusebox/
115-
116-
# DynamoDB Local files
117-
.dynamodb/
118-
119-
# TernJS port file
120-
.tern-port
121-
122-
# Stores VSCode versions used for testing VSCode extensions
123-
.vscode-test
124-
125-
# yarn v2
126-
.yarn/cache
127-
.yarn/unplugged
128-
.yarn/build-state.yml
129-
.yarn/install-state.gz
130-
.pnp.*
3+
classes/
4+
macros/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.compliance=1.8
5+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
7+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8+
org.eclipse.jdt.core.compiler.source=1.8

.vscode/launch.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "extensionHost",
9+
"request": "launch",
10+
"name": "Launch Extension",
11+
"args": [
12+
"--extensionDevelopmentPath=${workspaceFolder}"
13+
],
14+
"outFiles": [
15+
"${workspaceFolder}/out/**/*.js"
16+
],
17+
"sourceMaps": true,
18+
"trace": true,
19+
"preLaunchTask": "${defaultBuildTask}",
20+
"autoAttachChildProcesses": true
21+
}
22+
]
23+
}

.vscode/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"java.trace.server": "messages",
3+
"java.autobuild.enabled": true,
4+
"java.dependency.refreshDelay": 2000,
5+
"java.debug.settings.debugSupportOnDecompiledSource": "off",
6+
"files.watcherExclude": {
7+
"**/.git/objects/**": true,
8+
"**/.git/subtree-cache/**": true,
9+
"**/node_modules/*/**": true
10+
},
11+
"redhat.telemetry.enabled":false,
12+
"java.settings.url": ".settings/org.eclipse.jdt.core.prefs",
13+
"java.debug.settings.onBuildFailureProceed": true,
14+
15+
}

.vscode/tasks.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "watch",
7+
"problemMatcher": "$tsc-watch",
8+
"isBackground": true,
9+
"presentation": {
10+
"reveal": "never"
11+
},
12+
"group": {
13+
"kind": "build",
14+
"isDefault": true
15+
}
16+
},
17+
18+
]
19+
}

.vscodeignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
src/**
2+
tests/**
3+
node_modules/**
4+
*.ts
5+
.vscode/**
6+
tsconfig.json
7+
.eslintrc.json
8+
.vscodeignore
9+
vscode-java-debugx-ext-bridge/**
10+
.settings/**

README.md

Lines changed: 118 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,118 @@
1-
# vscode-java-debugx
2-
vscode-java-debugx enhances Java debugging in VS Code with advanced features like macro recording, runtime insights, and dynamic method invocation.
1+
<h1>
2+
<img src="media/vscode-java-debugx.gif" alt="Java DebugX" width="100" style="vertical-align: middle;"/>
3+
vscode-java-debugx
4+
</h1>
5+
6+
7+
## Overview
8+
9+
**Java DebugX** is a Visual Studio Code extension aimed at improving Java debugging by offering advanced macro recording and playback features. It allows developers to record key debugging events such as step-in, step-out, and breakpoints in a macro JSON format. This feature enables users to capture complex debugging sessions and replay them later, saving time and eliminating the need to manually redo the debugging process.
10+
11+
12+
## Features
13+
14+
- **Macro Recording and Playback**: Record debugging sessions, including step-ins, step-outs, and breakpoints. Play back the recorded sessions at any time.
15+
- **Customizable Bridge Configurations**: Define custom bridge classes and methods to integrate additional debugging insights.
16+
- **Advanced Debug Insights**: View detailed, real-time debugging information in a dedicated Insights view.
17+
- **Search External Files**: Search and index external files during debugging to improve traceability.
18+
- **Customizable File Patterns**: Define which files to include when indexing external files.
19+
20+
21+
22+
23+
## Installation
24+
25+
To install the **Java DebugX** extension in Visual Studio Code:
26+
27+
1. Open **Visual Studio Code**.
28+
2. Go to the **Extensions** view by clicking on the Extensions icon in the Activity Bar or pressing `Ctrl+Shift+X`.
29+
3. Search for **Vscode Java DebugX**.
30+
4. Click **Install**.
31+
32+
Alternatively, you can install it directly from the [Marketplace](https://marketplace.visualstudio.com/items?itemName=soumyaprasadrana.vscode-java-debugx).
33+
34+
## Getting Started
35+
36+
Once installed, the extension is activated when a Java project is opened. You can then start using the extension to record, play, and analyze debugging sessions.
37+
38+
### Key Features and Commands
39+
40+
- **Start Macro Recording**: Begin recording your debugging session. This will capture step-ins, step-outs, and breakpoints.
41+
- **Stop Macro Recording**: Stop recording and save the session data.
42+
- **Play Macro Recording**: Re-execute the recorded session.
43+
- **Pause/Resume/Stop Macro Playback**: Pause,resume or stop the playback of your recorded debugging session.
44+
- **Generate Sample Bridge Config**: Generate a sample configuration file to set up your custom bridge and define commands.
45+
- **Debug Insights**: View detailed insights from bridge configuration into your debugging session through a dedicated panel.
46+
47+
You can access these commands via the **Command Palette** (`Ctrl+Shift+P`), or find them in the **JavaDebugX** menu.
48+
49+
*You can add screenshots or GIFs of key actions here to guide users through the workflow.*
50+
51+
## Configuration
52+
53+
You can configure the extension by modifying the settings in your `settings.json`. The available settings are:
54+
55+
- **java.debugx.filePatterns**: Define file patterns to include when indexing external files (e.g., `*.java`, `*.js`, `*.xml`).
56+
- **java.debugx.externalFolder**: Set the path to an external folder that you want to index.
57+
- **java.debugx.macro.stepDelayInSeconds**: Configure the step delay during macro playback.
58+
- **java.debugx.bridgeConfigPath**: Set the absolute path to your custom bridge configuration file.
59+
60+
You can access and modify these settings in the **Settings** tab or directly in your `settings.json` file.
61+
62+
## Views and Menus
63+
64+
- **Insights View**: A dedicated view to show real-time debugging insights.
65+
![DebugInsightView](/media/vscode-java-debugx-bridge-insights.gif)
66+
67+
- **Debug Toolbar**: Commands for controlling the macro recording and playback are available in the debug toolbar.
68+
69+
*You can add a screenshot or GIF of the Insights view here.*
70+
71+
## Example Usage
72+
73+
### Generating a Sample Bridge Config
74+
75+
To generate a sample bridge configuration file:
76+
77+
1. Open the Command Palette (`Ctrl+Shift+P`).
78+
2. Search for and select **Generate Sample Bridge Config**.
79+
80+
This will generate a new bridge configuration file in your workspace, which you can modify to create your custom bridge logic.
81+
82+
![DebugInsight](/media/vscode-java-debugx-bridge.gif)
83+
84+
## Development
85+
86+
If you'd like to contribute or develop the extension locally, follow these steps:
87+
88+
1. Clone the repository:
89+
```bash
90+
git clone https://github.com/soumyaprasadrana/vscode-java-debugx.git
91+
```
92+
2. Install dependencies:
93+
```bash
94+
npm install
95+
```
96+
3. Build the extension:
97+
```bash
98+
npm run build-prod
99+
```
100+
4. Launch the extension in VS Code with:
101+
```bash
102+
npm run watch
103+
```
104+
105+
## License
106+
107+
This project is licensed under the [SEE LICENSE IN LICENSE](LICENSE).
108+
109+
## Author
110+
111+
**Soumya Prasad Rana**
112+
Email: soumyaprasad.rana@gmail.com
113+
GitHub: [soumyaprasadrana](https://github.com/soumyaprasadrana)
114+
115+
## Support
116+
117+
If you encounter any issues or need help, please visit the [issues page](https://github.com/soumyaprasadrana/vscode-java-debugx/issues) and open a new issue or check for existing discussions.
118+

build.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const esbuild = require('esbuild');
2+
3+
esbuild.build({
4+
entryPoints: ['src/extension.ts'], // Your entry file
5+
bundle: true,
6+
outfile: 'out/extension.js',
7+
external: ['vscode'], // Mark vscode as external
8+
platform: 'node', // This ensures the output is suitable for Node.js
9+
target: 'node14', // Set your desired Node.js version
10+
sourcemap: false,
11+
minify: true, // Optionally minify the output
12+
}).catch(() => process.exit(1));
115 KB
Loading

0 commit comments

Comments
 (0)