custom-module: add filename to error traces, add support for node/electron --inspect switch
This commit is contained in:
parent
c415dcf768
commit
358b19357d
2 changed files with 5 additions and 2 deletions
|
|
@ -83,5 +83,6 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
'instance-name':{type:'string',describe:'used to differenciate multiple instances in a zeroconf network'},
|
||||
'fullscreen':{type:'boolean', describe:'launch in fullscreen mode (only affects the default gui, F11 to exit)'}
|
||||
'fullscreen':{type:'boolean', describe:'launch in fullscreen mode (only affects the default gui, F11 to exit)'},
|
||||
'inspect':{type:'string', hidden: true}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,9 @@ class OscServer {
|
|||
})
|
||||
|
||||
try {
|
||||
mod = vm.runInContext(file, context)
|
||||
mod = vm.runInContext(file, context, {
|
||||
filename: customModule[0]
|
||||
})
|
||||
if (context.module.exports) mod = context.module.exports
|
||||
} catch(err) {
|
||||
console.error(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue