Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrade to 2025.0.0 : "Server[pid=x] is already being debugged" error #592

Open
SherekhanFR opened this issue Feb 7, 2025 · 1 comment
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@SherekhanFR
Copy link

Hello,

since I upgraded to version 2025.0.0, I get error "Server[pid=x] is already being debugged" while debugging Python Azure Function.

Image

if I downgrade to version 2024.14.0 it is working fine.

VSCode on Mac :

Version: 1.97.0
Commit: 33fc5a94a3f99ebe7087e8fe79fbe1d37a251016
Date: 2025-02-04T22:41:26.688Z (2 days ago)
Electron: 32.2.7
ElectronBuildId: 10660205
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin x64 20.6.0

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Attach to Python Functions",
            "type": "debugpy",
            "request": "attach",
            "connect": {
                "host": "localhost",
                "port": 9091
            },
            "preLaunchTask": "func: host start",
            "logToFile": true,
        }
    ]
}

ms-python.debugpy log file

0 Starting Session:
{
    "name": "Attach to Python Functions",
    "type": "debugpy",
    "request": "attach",
    "connect": {
        "host": "localhost",
        "port": 9091
    },
    "preLaunchTask": "func: host start",
    "logToFile": true,
    "__configurationTarget": 6,
    "clientOS": "unix",
    "debugOptions": [
        "RedirectOutput",
        "ShowReturnValue"
    ],
    "justMyCode": true,
    "showReturnValue": true,
    "workspaceFolder": "/Users/xxx/Workspace/xxxFunctionApp"
}
3 Client <-- Adapter:
{
    "seq": 1,
    "type": "event",
    "event": "output",
    "body": {
        "category": "telemetry",
        "output": "ptvsd",
        "data": {
            "packageVersion": "1.8.12"
        }
    }
}
3 Client <-- Adapter:
{
    "seq": 2,
    "type": "event",
    "event": "output",
    "body": {
        "category": "telemetry",
        "output": "debugpy",
        "data": {
            "packageVersion": "1.8.12"
        }
    }
}
10 Client --> Adapter:
{
    "command": "initialize",
    "arguments": {
        "clientID": "vscode",
        "clientName": "Visual Studio Code",
        "adapterID": "debugpy",
        "pathFormat": "path",
        "linesStartAt1": true,
        "columnsStartAt1": true,
        "supportsVariableType": true,
        "supportsVariablePaging": true,
        "supportsRunInTerminalRequest": true,
        "locale": "en",
        "supportsProgressReporting": true,
        "supportsInvalidatedEvent": true,
        "supportsMemoryReferences": true,
        "supportsArgsCanBeInterpretedByShell": true,
        "supportsMemoryEvent": true,
        "supportsStartDebuggingRequest": true,
        "supportsANSIStyling": true
    },
    "type": "request",
    "seq": 1
}
12 Client <-- Adapter:
{
    "seq": 3,
    "type": "response",
    "request_seq": 1,
    "success": true,
    "command": "initialize",
    "body": {
        "supportsCompletionsRequest": true,
        "supportsConditionalBreakpoints": true,
        "supportsConfigurationDoneRequest": true,
        "supportsDebuggerProperties": true,
        "supportsDelayedStackTraceLoading": true,
        "supportsEvaluateForHovers": true,
        "supportsExceptionInfoRequest": true,
        "supportsExceptionOptions": true,
        "supportsFunctionBreakpoints": true,
        "supportsHitConditionalBreakpoints": true,
        "supportsLogPoints": true,
        "supportsModulesRequest": true,
        "supportsSetExpression": true,
        "supportsSetVariable": true,
        "supportsValueFormattingOptions": true,
        "supportsTerminateRequest": true,
        "supportsGotoTargetsRequest": true,
        "supportsClipboardContext": true,
        "exceptionBreakpointFilters": [
            {
                "filter": "raised",
                "label": "Raised Exceptions",
                "default": false,
                "description": "Break whenever any exception is raised."
            },
            {
                "filter": "uncaught",
                "label": "Uncaught Exceptions",
                "default": true,
                "description": "Break when the process is exiting due to unhandled exception."
            },
            {
                "filter": "userUnhandled",
                "label": "User Uncaught Exceptions",
                "default": false,
                "description": "Break when exception escapes into library code."
            }
        ],
        "supportsStepInTargetsRequest": true
    }
}
13 Client --> Adapter:
{
    "command": "attach",
    "arguments": {
        "name": "Attach to Python Functions",
        "type": "debugpy",
        "request": "attach",
        "connect": {
            "host": "localhost",
            "port": 9091
        },
        "preLaunchTask": "func: host start",
        "logToFile": true,
        "__configurationTarget": 6,
        "clientOS": "unix",
        "debugOptions": [
            "RedirectOutput",
            "ShowReturnValue"
        ],
        "justMyCode": true,
        "showReturnValue": true,
        "workspaceFolder": "/Users/xxx/Workspace/xxxFunctionApp",
        "__sessionId": "xxx"
    },
    "type": "request",
    "seq": 2
}
14 Client <-- Adapter:
{
    "seq": 4,
    "type": "event",
    "event": "debugpyWaitingForServer",
    "body": {
        "host": "127.0.0.1",
        "port": 50981
    }
}
23 Client <-- Adapter:
{
    "seq": 5,
    "type": "response",
    "request_seq": 2,
    "success": false,
    "command": "attach",
    "message": "Server[pid=18781] is already being debugged."
}
24 Client --> Adapter:
{
    "command": "disconnect",
    "arguments": {
        "restart": false
    },
    "type": "request",
    "seq": 3
}
25 Client <-- Adapter:
{
    "seq": 6,
    "type": "event",
    "event": "terminated"
}
26 Client <-- Adapter:
{
    "seq": 7,
    "type": "response",
    "request_seq": 3,
    "success": true,
    "command": "disconnect"
}
26 Stopping Session
28 Error:
{}
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 7, 2025
@eleanorjboyd eleanorjboyd self-assigned this Feb 10, 2025
@andriimazur93
Copy link

@SherekhanFR I downgraded the version of the extension "Python Debugger" to v2024.14.0, now debugging of azure functions is working again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

3 participants