From 7ce897b26bf3a8f7476fd9ebf4d672c59eb09d5f Mon Sep 17 00:00:00 2001 From: satabol Date: Thu, 2 May 2024 00:04:45 +0300 Subject: [PATCH] - fix code style - update CHANGELOG.md --- CHANGELOG.md | 3 +++ src/communication.ts | 2 +- src/python_debugging.ts | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f040cc4..312a2e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/communication.ts b/src/communication.ts index 5f91961..ee886b9 100644 --- a/src/communication.ts +++ b/src/communication.ts @@ -134,7 +134,7 @@ function SERVER_handleRequest(request: any, response: any) { switch (req.type) { case 'setup': { let config = getConfig(); - let justMyCode:boolean = config.get('addon.justMyCode') + let justMyCode: 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); diff --git a/src/python_debugging.ts b/src/python_debugging.ts index e397831..ab6a633 100644 --- a/src/python_debugging.ts +++ b/src/python_debugging.ts @@ -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",