vscode-azurefunctions icon indicating copy to clipboard operation
vscode-azurefunctions copied to clipboard

Debug Azure functions

Open jdkorigan opened this issue 3 years ago • 4 comments

Issue Type: Bug

I have created 2 "azure functions Apps" in 2 different project with multi-root workspace.

Objective


I want to debug the functions App at the same time

Steps


I'am able to start the first function I'am able to start the second function As mentionned in VS code documentation "Multi-target debugging" I should see a dropbox list with the names of the functions when the second is complety downloaded. But nothing appears.

Result


I'm able to add breakpoint on the first Function but not on the second ?

Extension version: 1.5.0 VS Code version: Code 1.60.0 (e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff, 2021-09-01T10:41:52.311Z) OS version: Windows_NT x64 10.0.19042 Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.60GB (2.33GB free)
Process Argv --crash-reporter-id ecd26fc2-868e-46ec-9b28-c9f21b6d5931
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
vscextlang:30333561
binariesv615:30325510
pythonvssor306:30344512
bridge0708:30335490
pygetstartedt2:30360495
bridge0723:30353136
pythonf5test824cf:30361778
javagetstartedt:30351793
pythonvspyt187cf:30362783
pydsgsc2:30361791
vscus224cf:30358040
vssid140cf:30363604

jdkorigan avatar Sep 09 '21 15:09 jdkorigan

When you mention the docs, are you talking about this one? If not, please take a look: https://github.com/microsoft/vscode-azurefunctions/wiki/Multiple-function-projects

If that doesn't help, please send a screenshot of your workspace so that we can see what the file structure looks like.

ejizba avatar Sep 09 '21 17:09 ejizba

Thank you for help. I was refering to this doc https://code.visualstudio.com/docs/editor/debugging.

Regarding to your link, I have now the option to attach to both App in debugging list,

but when I start debugging the message on the bottom right corner says "Could not find launch configuation 'AppFunc-1' in the workspace. But as you can see I have launch.json in .vscode directory. (for both of my functions)

image

image

jdkorigan avatar Sep 10 '21 14:09 jdkorigan

Sorry, I made a mistake in my code-workspace

"compounds": [ { "name": "Attach to both App", "configurations": [ "Func-1", "Func-2" ] }

in "configurations" this is the name that is used to launch found in launch.json. (and not the path found in workspace)

jdkorigan avatar Sep 10 '21 14:09 jdkorigan

But I still have the same problem.

Maybe what I want to do is not correct. When both functions have started, I'm able to set a breakpoint to the first function but not the second? is it possible?

When activated with postman the debugger starts correctly for the frist function, but for the second one it runs, but no breakpoint is raised?

jdkorigan avatar Sep 10 '21 14:09 jdkorigan

Have you been able to find a solution to this problem since your last post?

MicroFish91 avatar Aug 25 '22 22:08 MicroFish91

Closing as stale

alexweininger avatar Sep 01 '22 23:09 alexweininger