-
-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
I was wondering how to debug the data coming back from the then function within :
`exports.up = function(db) {
var filePath = path.join(__dirname, 'sqls', '20190409095035-data-migration-region-up.sql');
return new Promise( function( resolve, reject ) {
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
if (err) return reject(err);
console.log('received data: ' + data);
resolve(data);
});
})
.then(function(data) {
**debugger**; // -> Wanted to put the chrome debugger here for node.js
return db.runSql(data);
});
};`
I tried something like:
node --inspect-brk config/migrations/20190409095035-data-migration-region.js
to get a hook in the file. It triggered the basic breakpoint, but once the command:
db-migrate up --migrations-dir config/migrations --config config/database.js --env dev
runs, it doesn't get hooked in the debug listener.
Any suggestions on how to get the instance to get hooked?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Metadata
Metadata
Assignees
Labels
No labels