Help Center/ ModelArts/ FAQs/ Notebook (New Version)/ VS Code/ What Do I Do If the Source Code Cannot Be Accessed When I Use VS Code for Debugging?
Updated on 2024-06-15 GMT+08:00

What Do I Do If the Source Code Cannot Be Accessed When I Use VS Code for Debugging?

If the launch.json file already exists, go to step 3.

Step 1: Open launch.json.
  • Method 1: Click Run (Ctrl+Shift+D) in the menu bar on the left and click create a launch.json file.

  • Method 2: In the menu bar, choose Run > Open configurations.

Step 2: Select a language.

To set a Python language, select Python File in Select a debug configuration. The operations for setting other languages are similar.

Step 3: Set justMyCode to False in launch.json.

	    {
	        // Use IntelliSense to learn about possible attributes.
	        // Hover to view descriptions of existing attributes.
	        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
	        "version": "0.2.0",
	        "configurations": [
	            {
	                "name": "Python: Current file",
	                "type": "python",
	                "request": "launch",
	                "program": "${file}",
	                "console": "integratedTerminal",
	                "justMyCode": false
	            }
	        ]
	    }