Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

Off-by-one-line error in transpiled breakpoint #153

@ofrobots

Description

@ofrobots

app.ts

import * as debug from '@google/cloud-debug'
import * as express from 'express';
var app = express();
app.get('/', (req, res) => {
  res.status(200).send(`express + ${debug}`);
});
app.get('/hello/:name', (req, res) => {
  var msg : string = `Hello ${req.params.name}`;
  res.status(200).send(msg);
});

app.listen(process.env.PORT || 8080, function() {
  console.log('App started');
});

export var App = app;

Compile with tsc --sourceMap app.ts, producing app.js:

"use strict";
var debug = require('@google/cloud-debug');
var express = require('express');
var app = express();
app.get('/', function (req, res) {
    res.status(200).send("express + " + debug);
});
app.get('/hello/:name', function (req, res) {
    var msg = "Hello " + req.params.name;
    res.status(200).send(msg);
});
app.listen(process.env.PORT || 8080, function () {
    console.log('App started');
});
exports.App = app;
//# sourceMappingURL=app.js.map

Set breakpoint at app.ts:9. This corresponds to app.js:10. We, however, resolve this to app.js:9. msg is undefined.

screen shot 2016-10-02 at 1 10 36 pm

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: clouddebuggerIssues related to the googleapis/cloud-debug-nodejs API.triage meI really want to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions