From 09728bf43ce5eaed3060d0ce8aae323055aa6cba Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 28 May 2014 13:00:45 +0200 Subject: Debugger script&data now accept "0x" values --- ethereal/assets/debugger/debugger.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ethereal/assets') diff --git a/ethereal/assets/debugger/debugger.qml b/ethereal/assets/debugger/debugger.qml index 7c3ffbceb..40b0b68b1 100644 --- a/ethereal/assets/debugger/debugger.qml +++ b/ethereal/assets/debugger/debugger.qml @@ -14,6 +14,9 @@ ApplicationWindow { width: 1290 height: 900 + property alias codeText: codeEditor.text + property alias dataText: rawDataField.text + MenuBar { Menu { title: "Debugger" @@ -167,6 +170,7 @@ ApplicationWindow { } } } + toolBar: ToolBar { RowLayout { spacing: 5 @@ -205,7 +209,7 @@ ApplicationWindow { function setInstruction(num) { asmTableView.selection.clear() - asmTableView.selection.select(num-1) + asmTableView.selection.select(num) } function setMem(mem) { -- cgit v1.2.3 From 1eda1d25b0d27fe57287698fb883c9153ddda292 Mon Sep 17 00:00:00 2001 From: Maran Date: Wed, 28 May 2014 15:48:17 +0200 Subject: Hooked up the Block Explorer to the Debugger so we can instantly debug made transactions --- ethereal/assets/qml/wallet.qml | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'ethereal/assets') diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml index bba9c1d3b..82b680913 100644 --- a/ethereal/assets/qml/wallet.qml +++ b/ethereal/assets/qml/wallet.qml @@ -340,8 +340,8 @@ ApplicationWindow { id: popup visible: false property var block - width: 800 - height: 280 + width: root.width + height: 240 x: root.x y: root.y + root.height Component{ @@ -389,17 +389,27 @@ ApplicationWindow { onClicked: { var tx = transactionModel.get(row) if(tx.data) { - popup.showContractData(tx.data) + popup.showContractData(tx) }else{ popup.height = 230 } } } - function showContractData(data) { - contractData.text = data + + function showContractData(tx) { + txDetailsDebugButton.tx = tx + if(tx.createsContract) { + contractData.text = tx.data + contractLabel.text = "

Transaction created contract " + tx.address + "

" + }else{ + contractLabel.text = "

Transaction ran contract " + tx.address + "

" + contractData.text = tx.rawData + } popup.height = 400 } + Rectangle { + id: txDetails width: popup.width height: 300 anchors.left: listViewThing.left @@ -411,6 +421,22 @@ ApplicationWindow { id: contractLabel anchors.leftMargin: 10 } + Button { + property var tx + id: txDetailsDebugButton + anchors.right: parent.right + anchors.rightMargin: 10 + anchors.top: parent.top + anchors.topMargin: 10 + text: "Debug contract" + onClicked: { + if(tx.createsContract){ + ui.startDbWithCode(tx.rawData) + }else { + ui.startDbWithContractAndData(tx.address, tx.rawData) + } + } + } TextArea { id: contractData text: "Contract" @@ -437,7 +463,7 @@ ApplicationWindow { transactionModel.insert(0, block.txs.get(i)) } if(block.txs.get(0).data){ - popup.showContractData(block.txs.get(0).data) + popup.showContractData(block.txs.get(0)) } } txView.forceActiveFocus() -- cgit v1.2.3 From d4f9daa631fa832d556c16f3a29eaf73bd849f32 Mon Sep 17 00:00:00 2001 From: Maran Date: Wed, 28 May 2014 16:14:24 +0200 Subject: Refactor hex encode and remove coupling of popup to main window --- ethereal/assets/qml/wallet.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ethereal/assets') diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml index 82b680913..0e0e3d78d 100644 --- a/ethereal/assets/qml/wallet.qml +++ b/ethereal/assets/qml/wallet.qml @@ -342,8 +342,6 @@ ApplicationWindow { property var block width: root.width height: 240 - x: root.x - y: root.y + root.height Component{ id: blockDetailsDelegate Rectangle { @@ -442,6 +440,7 @@ ApplicationWindow { text: "Contract" anchors.top: contractLabel.bottom anchors.left: parent.left + anchors.bottom: popup.bottom wrapMode: Text.Wrap width: parent.width - 30 height: 80 -- cgit v1.2.3