Help Center/ ModelArts/ FAQs/ ModelArts Standard Notebook/ What Should I Do If the Source Code Cannot Be Accessed When I Use VS Code to Debug Code on a ModelArts Notebook Instance?
Updated on 2025-08-28 GMT+08:00

What Should I Do If the Source Code Cannot Be Accessed When I Use VS Code to Debug Code on a ModelArts Notebook Instance?

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
	            }
	        ]
	    }