Error in snapshot debugging
Describe the bug I'm trying to se snapshot debugging in cloud, and I get an error when trying to start from VSCode
To Reproduce Steps and to reproduce the behavior:
- I add the configuration in tha launch.json file
- I try to Initialize snapshot debugging
Expected behavior
Snapshot debuggin should be initialized
Screenshots

5. Versions:
- AL Language: v6.5.413786
- Business Central: 17.4.21491.21531
Where have you defined your snappoints? I mean what is the file name of those files that contain snappoints
It looks that i was having an issue because I added the point at the onOpenPage triger into the customer list. Deleting that point, it started to "work". I dind't get any result, but at least I don't get that error
Ok, and what was the path of the OnOpenPage trigger? Can you paste it here. Since this is a bug I wish to fix but I would like to understand what has failed.
Hello,
I will try to explain the steps I've followed:

Now, I add the breakpoint:



Thanks. What is the path for "Page 22 Customer List - Base Application.al" ? Is it the base application that is opened for you and you try triggering a snapshot debugging?
There are other ways to achieve what you want. As a fact: If you put a snappoint in a file and that snappoint would not match the line that executes the server the snappoint will be ignored, or you would get information on something else you wanted
I would create a a. HelloWorld, b. Download symbols on the snapshot endpoint. This makes sure that you have the correct symbols. c. Go to definition on the "Customer List" d. Put a snappoint in the OnOpen Page in the dal file. e. Initialize snapshot debugging.
Thank you,
I have created the new extension, and added the breakpoint correctly (before i was using the object opened by the object designer extension). ANd this is how tha launch file looks like:

I don't get any error when initializing and stoping the snapshot debugging, but I get this message when ending the debugging:

- We do not support AL objects opened by other designers for now like object designer. All debugging interactions has to happen through the AL languages server and AL debug adapter.
- Have you opened the web client and tried your scenario that you wanted the snapshot debugger to record? The snapshot debugger is like a recorder of AL code running on a BC server. a. You initiate the recording from VSCode b. You play it in the client in teh meantime the recorder records all your AL stacktraces and lines executed. c. You finish it in vscode and then you get a file that you can debug. Debugging is based on snappoints.
After you have initialized a snapshot session and connected a web client you should have got a message that "there is a snapshot debugging session started on your behalf..."
You can also see the status if you click here:

I get it! Seems that I have to open the webClient after initialazing the snapshot, am I right? One question. Imagine I have one extension uploaded into a production tenant. That extension is still developing, so now it's different to the one uplaoded into the tennant. To do the snapshot debugging, I must upload the same version that i have openned into the VSCode?
Yes you have to open the webclient to make a snapshot. You do not have to upload a work in progress extension to snapshot debug your existing version on a production environment. You need to download symbols on the snapshot endpoint and then you will get the symbols from the production environment. This means that when you download symbols choose the debug configuration that is snapshotinitialize and targets the production environment. This is the only way to download symbols on production code. Snappoints will resolve against your production code and not your work in progress code in the snapshot debugger (when you debug the created snapshot)
Thank you @kalberes for all yuor tips, really helpful! Now it's my time to get familiarized with the snapshot debugging, really appreciated!
Sorry for writing again, but I'm doing test and it seems I don't have everything clear. I've notices that when I open the client, id I don't get the "there is a snapshot debugging session started on your behalf...", the snapshot eneds without creating any file. Which could be the reason not to see that message when I open the client? I think I'm doing everything correct, but of course, it's not...
Are you connecting to an existing session (by specifying the id) or the next available "client"? The dialog box is only shown when you do not connect to an existing session Id due to current design limitations. But as I have mentioned you can always lookup the status by clicking on the available snapshots on the left bottom corner. That will tell you if you have connected or not
The launch file is this:

I initialize the snapshot:

I open BC, and don't the the pop-up message. I do different thing on BC, and once finisehd the snapshot:

Hi @aetxebarria , I'm having the same error you're describing in your last post. The snapshot debug session status is "initialized" and even though I open the BC session and I get the message saying that a snapshot debug session has started, if I go to the snapshot debug session list, the status never gets updated to "started". Did you manage to workaround this? I'm trying on a Production environment with BC 19.0 on SaaS.
Hi,
I'm having the same error . The snapshot debug session status is "initialized" and never chnaged to Started , so at the end i cannot download snapshoot file.
Hi there, Any solution found for the mentioned issue ? In a certain point even thought that a snapshot file is initialized, when finishing the snapshot, no file have been created.. If I try to clear credential cache, and star a session from scratch I have a "Bad request" as a response.
Every kind of tip will be useful :) Thank you.