Shanedell commented on a change in pull request #41:
URL: https://github.com/apache/daffodil-vscode/pull/41#discussion_r731787672



##########
File path: src/daffodilDebugger.ts
##########
@@ -104,42 +101,25 @@ export async function getDebugger(config: 
vscode.DebugConfiguration) {
 
       // Code for downloading and setting up daffodil-debugger files
       if (!fs.existsSync(`${rootPath}/${artifact.name}`)) {
-        // Get daffodil-debugger of version entered using http client
-        const client = new HttpClient('client') // TODO: supply daffodil 
version from config
-        const artifactUrl = artifact.archiveUrl(backend)
-        const response = await client.get(artifactUrl)
-
-        if (response.message.statusCode !== 200) {
-          const err: Error = new Error(
-            `Couldn't download the Daffodil debugger backend from 
${artifactUrl}.`
+        // Get daffodil-debugger zip from extension files
+        const filePath = path
+          .join(
+            context.asAbsolutePath('./server/core/target/universal'),
+            artifact.archive
           )
-          err['httpStatusCode'] = response.message.statusCode
-          throw err
+          .toString()
+
+        // If debugging the extension without vsix installed make sure 
debugger is created
+        if (!filePath.includes('.vscode/extension')) {
+          if (!fs.existsSync(filePath)) {
+            let baseFolder = context.asAbsolutePath('./')
+            child_process.execSync(
+              `cd ${baseFolder} && sbt universal:packageBin`

Review comment:
       That is correct but I put this in here just in case the user forgot to 
run this command and forgot to generate the zip, this ensures it is created. I 
added it for ease of use




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to