Commit 2f103112 authored by yann300's avatar yann300

fix typo

parent 2c6c4810
...@@ -182,10 +182,19 @@ module.exports = { ...@@ -182,10 +182,19 @@ module.exports = {
'Should call the debugger api: getTrace': function (browser: NightwatchBrowser) { 'Should call the debugger api: getTrace': function (browser: NightwatchBrowser) {
browser browser
.addFile('test_jsCompileWithOptimization.js', { content: jsDebug }) .addFile('test_jsGetTrace.js', { content: jsGetTrace })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(3000) .pause(3000)
.journalChildIncludes(`{ "gas": "0x2dc6c0", "return": "0x", "structLogs":`) .journalChildIncludes(`{ "gas": "0x2dc6c0", "return": "0x", "structLogs":`)
},
'Should call the debugger api: debug': function (browser: NightwatchBrowser) {
browser
.addFile('test_jsDebug.js', { content: jsDebug })
.executeScript('remix.exeCurrent()')
.pause(3000)
.clickLaunchIcon('debugger')
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92')
.end() .end()
}, },
...@@ -344,7 +353,7 @@ const localVariable_step717_ABIEncoder = { ...@@ -344,7 +353,7 @@ const localVariable_step717_ABIEncoder = {
} }
} }
const jsDebug = `(async () => { const jsGetTrace = `(async () => {
try { try {
const result = await remix.call('debugger', 'getTrace', '0xb175c3c9a9cd6bee3b6cc8be3369a945ac9611516005f8cba27a43486ff2bc50') const result = await remix.call('debugger', 'getTrace', '0xb175c3c9a9cd6bee3b6cc8be3369a945ac9611516005f8cba27a43486ff2bc50')
console.log('result ', result) console.log('result ', result)
...@@ -352,3 +361,12 @@ const jsDebug = `(async () => { ...@@ -352,3 +361,12 @@ const jsDebug = `(async () => {
console.log(e.message) console.log(e.message)
} }
})()` })()`
const jsDebug = `(async () => {
try {
const result = await remix.call('debugger', 'debug', '0xb175c3c9a9cd6bee3b6cc8be3369a945ac9611516005f8cba27a43486ff2bc50')
console.log('result ', result)
} catch (e) {
console.log(e.message)
}
})()`
...@@ -23,11 +23,11 @@ const profile = { ...@@ -23,11 +23,11 @@ const profile = {
class DebuggerTab extends ViewPlugin { class DebuggerTab extends ViewPlugin {
constructor (blockchain, editor, offsettolinecolumnconverter) { constructor (blockchain, editor, offsetToLineColumnConverter) {
super(profile) super(profile)
this.el = null this.el = null
this.editor = editor this.editor = editor
this.offsetToLineColumnConverter = offsettolinecolumnconverter this.offsetToLineColumnConverter = offsetToLineColumnConverter
this.blockchain = blockchain this.blockchain = blockchain
this.debugHash = null this.debugHash = null
this.removeHighlights = false this.removeHighlights = false
...@@ -112,7 +112,7 @@ class DebuggerTab extends ViewPlugin { ...@@ -112,7 +112,7 @@ class DebuggerTab extends ViewPlugin {
const currentReceipt = await web3.eth.getTransactionReceipt(hash) const currentReceipt = await web3.eth.getTransactionReceipt(hash)
const debug = new Debugger({ const debug = new Debugger({
web3, web3,
offsetToLineColumnConverter: this.offsettolinecolumnconverter, offsetToLineColumnConverter: this.offsetToLineColumnConverter,
compilationResult: async (address) => { compilationResult: async (address) => {
try { try {
return await this.fetchContractAndCompile(address, currentReceipt) return await this.fetchContractAndCompile(address, currentReceipt)
......
...@@ -147,7 +147,7 @@ export const DebuggerUI = ({ debuggerModule }) => { ...@@ -147,7 +147,7 @@ export const DebuggerUI = ({ debuggerModule }) => {
const currentReceipt = await web3.eth.getTransactionReceipt(txNumber) const currentReceipt = await web3.eth.getTransactionReceipt(txNumber)
const debuggerInstance = new Debugger({ const debuggerInstance = new Debugger({
web3, web3,
offsetToLineColumnConverter: debuggerModule.offsettolinecolumnconverter, offsetToLineColumnConverter: debuggerModule.offsetToLineColumnConverter,
compilationResult: async (address) => { compilationResult: async (address) => {
try { try {
return await debuggerModule.fetchContractAndCompile(address, currentReceipt) return await debuggerModule.fetchContractAndCompile(address, currentReceipt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment