Open isaacporat opened 2 years ago
This issue is stale since it has been open for 14 days with no activity. Please respond or this issue will be closed soon.
Hello
I managed to get local debugging to work as follows:
The project I had the problem with was created using the cli with the 'ask new' command. I worked on it for a while but it is essentially 'Hello World' with minor modifications. I opened the project in VSCode using the context menu in FileExplorer in Windows 10. The debugger started with no error indication but using the simulator the remote code was run instead of the local one (as if the debugger was not running at all).
I thought this might be to do with the metadata in ask-resources.json In the Toolkit Management view I tried to open the project first and then tried the download option. I was informed in both cases that the metadata was updated but still local debugging did not work. I then created a new project from scratch in the Management view, copied my code and other relevant files from the initial project and the local debug started to work as expected. The cli simulator 'ask dialog' works well too. Perhaps I should not have assumed that a cli created project should work with the Toolkit but at least, when the debugger starts and regardless of the reasons why the local code is not run, a clear error should be given to the developer.
Thanks Isaac
This issue is stale since it has been open for 14 days with no activity. Please respond or this issue will be closed soon.
This stale issue has been closed now. Please reopen the issue if you are still having problems with the toolkit.
OS: Windows_NT x64 10.0.19043 Visual Studio Code Version: 1.64.2 Alexa Skills Toolkit Version: 2.10.1 Git Version: git version 2.34.1.windows.1 Python version 3.8.7
I am trying to follow a workflow where I can debug locally; changing my Python code locally, testing with the simulator, repeating the process as required and only then deploy.
I am using the 'Alexa hosted' option and hence, as instructed deploy using git.
I created a new project using the 'cli new' command, I am using the default 'Hello World' template. It works well using the 'cli dialog' simulator on the code in the cloud of course.
The older approach localhost / ngrok / local_debugger.py (from the cookbook) works well for debugging locally but it is more cumbersome; running ngrok and changing the end point parameters in the console, hence trying the toolkit.
I installed the toolkit in VSCode as per instructions including setting the launcher. I installed ask-sdk-local-debug in the Python virtual folder. When I start the debugger it is indicated correctly on the status bar.
When I test using the toolkit simulator, regardless of whether I started the debugger or not the skill runs the code in the cloud that I deployed before not local code. There is no indication that the debugger runs on the terminal or the debug console. Note that I don't even debug as such; I just modified a message in the lambda_function.py file so that I can distinguish between the local and cloud versions of the code when running the simulator.
What am I doing wrong?
Thanks Isaac