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

Server[pid=XXXX] is already being debugged #1831

Closed
felipewhitaker opened this issue Feb 11, 2025 · 2 comments
Closed

Server[pid=XXXX] is already being debugged #1831

felipewhitaker opened this issue Feb 11, 2025 · 2 comments
Assignees

Comments

@felipewhitaker
Copy link

Before creating a new issue, please check the FAQ to see if your question is answered there.

Environment data

  • debugpy version: XXX (run import debugpy; print(debugpy.__version__) if uncertain): 1.8.9
  • OS and version: Windows 11
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.10.6 (conda-forge) [MSC v.1929 64 bit (AMD64)] on win32
  • Using VS Code or Visual Studio: VS Code

Actual behavior

Server[pid=XXXX] is already being debugged

Expected behavior

No message

Steps to reproduce:

  1. Follow AzFunc Quickstart
  2. Choose blob_trigger
  3. Create container (sample-workitems)
  4. Run
  5. (error message)

The related files are both in gist for easy reading, and in [repository](https://github.com/[felipewhitaker/azfunc](https://github.com/felipewhitaker/azfunc) for reproduction.

In short, starting the following resulted in Server[pid=4768] is already being debugged.

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "python",
    "4931ba_STORAGE": "UseDevelopmentStorage=true"
  }
}
# function_app.py
import azure.functions as func
import logging

app = func.FunctionApp()

@app.blob_trigger(arg_name="myblob", path="sample-workitems",
                               connection="4931ba_STORAGE") 
def blob_triggered(myblob: func.InputStream):
    logging.info(f"Python blob trigger function processed blob"
                f"Name: {myblob.name}"
                f"Blob Size: {myblob.length} bytes")

As shown in logs below (see 14):

...
8 Client --> Adapter:
{
    "command": "attach",
    "arguments": {
        "name": "Attach to Python Functions",
        "type": "debugpy",
        "request": "attach",
        "connect": {
            "host": "localhost",
            "port": 9091
        },
        "logToFile": true,
        "preLaunchTask": "func: host start",
        "__configurationTarget": 6,
        "clientOS": "windows",
        "debugOptions": [
            "RedirectOutput",
            "ShowReturnValue"
        ],
        "justMyCode": true,
        "showReturnValue": true,
        "workspaceFolder": "c:\\Users\\u61819\\OneDrive - Statkraft AS\\Documents\\code\\azurite",
        "__sessionId": "29c362e7-1f3b-4939-a221-372123f2e87d"
    },
    "type": "request",
    "seq": 2
}
9 Client <-- Adapter:
{
    "seq": 4,
    "type": "event",
    "event": "debugpyWaitingForServer",
    "body": {
        "host": "127.0.0.1",
        "port": 55693
    }
}
...
14 Client <-- Adapter:
{
    "seq": 5,
    "type": "response",
    "request_seq": 2,
    "success": false,
    "command": "attach",
    "message": "Server[pid=4768] is already being debugged."
}
...
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Feb 11, 2025
@felipewhitaker
Copy link
Author

Possibly related to #168

@felipewhitaker
Copy link
Author

Closing in favor of Azure/Azurite#2530

@judej judej removed the needs repro Issue has not been reproduced yet label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants