Skip to content

Commit

Permalink
- fix code style
Browse files Browse the repository at this point in the history
- update CHANGELOG.md
  • Loading branch information
satabol committed May 1, 2024
1 parent 58743ae commit 7ce897b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

### Added
- New `blender.addon.justMyCode` option. True (On) - allow debug a user python code of addon only. False (Off) - allow debug a user python code of addon and external libraries code too. Restart Blender debug session after switch this option.

## [0.0.19] - 2023-12-05

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/communication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function SERVER_handleRequest(request: any, response: any) {
switch (req.type) {
case 'setup': {
let config = getConfig();
let justMyCode:boolean = <boolean>config.get('addon.justMyCode')
let justMyCode: boolean = <boolean>config.get('addon.justMyCode')
let instance = new BlenderInstance(req.blenderPort, req.debugpyPort, justMyCode, req.blenderPath, req.scriptsFolder, req.addonPathMappings);
instance.attachDebugger();
RunningBlenders.register(instance);
Expand Down
4 changes: 2 additions & 2 deletions src/python_debugging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import { AddonPathMapping } from './communication';
type PathMapping = { localRoot: string, remoteRoot: string };

export async function attachPythonDebuggerToBlender(
port: number, blenderPath: string, justMyCode:boolean, scriptsFolder: string,
port: number, blenderPath: string, justMyCode: boolean, scriptsFolder: string,
addonPathMappings: AddonPathMapping[]) {

let mappings = await getPythonPathMappings(scriptsFolder, addonPathMappings);
attachPythonDebugger(port, justMyCode, mappings);
}

function attachPythonDebugger(port: number, justMyCode:boolean, pathMappings: PathMapping[] = []) {
function attachPythonDebugger(port: number, justMyCode: boolean, pathMappings: PathMapping[] = []) {
let configuration = {
name: `Python at Port ${port}`,
request: "attach",
Expand Down

0 comments on commit 7ce897b

Please sign in to comment.