No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to change launch.json or package.json for run dev or build in VS Code for 0.15.x

    Help
    2
    4
    1950
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      terry last edited by

      with the 0.14.7 version, I use VS Code as below “launch.json”

      "configurations": [
      	{
      		"type": "node",
      		"request": "launch",
      		"name": "Launch Program",
      		"program": "${workspaceRoot}/build/script.dev.js"
      	}
      ]
      

      then, for quasar 0.15.x , what I have to do dev/build in VS Code?

      even I add the dev/build lines in package.json

      “scripts”: {
      “lint”: “eslint --ext .js,.vue src”,
      “test”: “echo “No test specified” && exit 0”,
      “dev”: “quasar dev”,
      “build”: “quasar build”
      }…

      and

      launch.json is modified as below

      	{
      		"type": "node",
      		"request": "launch",
      		"name": "Launch via NPM",
      		    "cwd": "${workspaceFolder}",
      		"runtimeExecutable": "npm",
      		"runtimeArgs": [
      			"run",
      			"dev"
      		],
      		"port": 8080
      	}
      

      but it not work.

      I hope to get help ㅠㅠ

      LaurentPayot 1 Reply Last reply Reply Quote 0
      • LaurentPayot
        LaurentPayot @terry last edited by LaurentPayot

        @terry Launch is for browsers. Instead why don’t you simply create a npm script in package.json, such as for instance:

        "dev": "quasar dev -m pwa",
        

        and then in vscode Task > Run Task… and chose npm: dev

        1 Reply Last reply Reply Quote 2
        • T
          terry last edited by

          Thanks @LaurentPayot ,

          after add the line in package.json as you comment,
          I also add to this launch.json as below

          “configurations”: [

          	{
          		"type": "node",
          		"request": "launch",
          		"name": "Start quasar",
          		"runtimeExecutable": "npm",
          		"runtimeArgs": [
          			"run-script",
          			"dev"
          		]
          	},
             {
            "type": "chrome",
            "request": "launch",
            "name": "Debug Quasar",
            "url": "http://localhost:8080",
            "webRoot": "${workspaceRoot}",
            "sourceMaps": true,
            "sourceMapPathOverrides": {
              "webpack:///*": "${webRoot}/*"
            }
          	 }
          ],
          

          then once “Start without debugging” ( ^F5) for “Start Quasar” , And then “Start debug” of “Debug quasar” configuration. Then I could start hot-reload state of my app and debug with VS Code, even I am not sure it is the best.

          1 Reply Last reply Reply Quote 0
          • T
            terry last edited by

            I update as below for start debug of “quasar dev” for VS code , It works as I expected. In order debuging in VS code, have to launch “Debug Quasar” after start debug.

            "configurations": [
            
            	   {
            		   "type": "node",
            		   "request": "launch",
            		   "name": "Launch Program",
            		   "program": "/usr/local/bin/quasar",
            		   "args": ["dev"]
            	   },
            1 Reply Last reply Reply Quote 0
            • First post
              Last post