Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

HTTP Function hangs when debugging #53

Closed
jasonpolites opened this issue Mar 3, 2017 · 1 comment
Closed

HTTP Function hangs when debugging #53

jasonpolites opened this issue Mar 3, 2017 · 1 comment
Labels

Comments

@jasonpolites
Copy link
Contributor

Description

I have a simple HTTP function, literally copied from the default function that you get when you create a new HTTP Function in the UI:

exports.helloWorld = function helloWorld(req, res) {
  // Example input: {"message": "Hello!"}
  if (req.body.message === undefined) {
    // This is an error case, as "message" is required.
    res.status(400).send('No message defined!');
  } else {
    // Everything is okay.
    console.log(req.body.message);
    res.status(200).send('Success: ' + req.body.message);
  }
};

When debugging (with default emulator setting) using Visual Studio Code, I "attach" to the emulator (after having started with --debug) and my break point fires after issuing a curl command from the terminal. Hitting "play" in VS Code seems to cause execution to continue, but the function doesn't return from the curl command

@jmdobry
Copy link
Contributor

jmdobry commented Mar 5, 2017

I was able to reproduce this issue with 1.0.0-alpha.6, but it appears to be fixed by #55

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants