-
Notifications
You must be signed in to change notification settings - Fork 565
Fixed a bug with the wrong event name #1347
Conversation
Hello @EthanWan , Thanks for the PR. Can you please add more details and reference to your changes? |
Recently, when i use remix-ide of new version to debug my contract. i found that the full storages changes not display (it's good in old version). as shown in below img So. I went to check the remix-ide source code. the code to get full storages is: this.vmDebuggerLogic.event.register('traceStorageUpdate', this.fullStoragesChangesPanel.update.bind(this.fullStoragesChangesPanel)) But when i check remix-debug's code. I can't find trigget for this event which name is |
After testing, my commit was not enough to fix the problem and i still need to change some code to make it works. self.event.register('indexChanged', this, function (index) {
if (index < 0) return
if (self.stepManager.currentStepIndex !== index) return
if (!self.storageResolver) return
if (index !== self.traceLength - 1) {
return self.event.trigger('traceStorageUpdate', [{}])
}
var storageJSON = {}
for (var k in self.addresses) {
var address = self.addresses[k]
var storageViewer = new StorageViewer({ stepIndex: self.stepManager.currentStepIndex, tx: self.tx, address: address }, self.storageResolver, self._traceManager)
storageViewer.storageRange(function (error, result) {
if (!error) {
storageJSON[address] = result
self.event.trigger('traceStorageUpdate', [storageJSON])
}
})
}
}) By the way, I have a question, why need add this judgment if (index !== self.traceLength - 1) {
return self.event.trigger('traceStorageUpdate', [{}])
} |
Thanks for the great explanation @EthanWan . I would like to ask that after these changes, were you able to see the data in "Full Storage Changes" section of IDE. I tried with your changes but there seems no changes. |
Yes i can. but just the last step of debugging Because of this judgment, but I don’t know why it was added if (index !== self.traceLength - 1) {
return self.event.trigger('traceStorageUpdate', [{}])
} |
That check should be handled, will do in my next PR. Thanks for your awesome work. 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
The debug at Remix-ide of the new version can't display full storage changes, emmm... i think this is the reason