diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 56965e31a9..9fdd7fb6c2 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -191,14 +191,14 @@ module.exports = { .clickFunction('f - transact (not payable)', { types: 'uint256[] ', values: '[]' }) .debugTransaction(0) .pause(2000) - .click('*[data-id="debuggerTransactionStartButton"]') // stop debugging + .click('*[id="debuggerTransactionStartButtonContainer"]') // stop debugging .click('*[data-id="debugGeneratedSourcesLabel"]') // select debug with generated sources - .click('*[data-id="debuggerTransactionStartButton"]') // start debugging + .click('*[id="debuggerTransactionStartButtonContainer"]') // start debugging .pause(2000) .getEditorValue((content) => { browser.assert.ok(content.indexOf('if slt(sub(dataEnd, headStart), 32)') !== -1, 'current displayed content is not a generated source') }) - .click('*[data-id="debuggerTransactionStartButton"]') + .click('*[id="debuggerTransactionStartButtonContainer"]') }, // depends on Should debug using generated sources 'Should call the debugger api: getTrace #group4': function (browser: NightwatchBrowser) { diff --git a/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.css b/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.css index 835b54615b..75f8f771d5 100644 --- a/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.css +++ b/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.css @@ -6,16 +6,42 @@ width: 100%; display: flex; justify-content: center; + align-items: center; + color: #fff; } .stepButton { } + +.stepButtonDisabled { + background-color: #005573; + border-color: #005573; +} + +.stepButton:hover { + color: #fff; + background-color: #005573; + border-color: #005573; +} .jumpButtons { width: 100%; display: flex; justify-content: center; + align-items: center; + color: #fff; } .jumpButton { } + +.jumpButtonDisabled { + background-color: #005573; + border-color: #005573; +} + +.jumButton:hover { + color: #fff; + background-color: #005573; + border-color: #005573; +} .navigator { } .navigator:hover { diff --git a/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx b/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx index 2db94f72cc..f1c0826eb2 100644 --- a/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/button-navigator/button-navigator.tsx @@ -1,4 +1,5 @@ import React, { useState, useEffect } from 'react' // eslint-disable-line +import { OverlayTrigger, Tooltip } from 'react-bootstrap' import './button-navigator.css' export const ButtonNavigation = ({ stepOverBack, stepIntoBack, stepIntoForward, stepOverForward, jumpOut, jumpPreviousBreakpoint, jumpNextBreakpoint, jumpToException, revertedReason, stepState, jumpOutDisabled }) => { @@ -50,22 +51,120 @@ export const ButtonNavigation = ({ stepOverBack, stepIntoBack, stepIntoForward, }) } + const stepBtnStyle = 'd-flex align-items-center justify-content-center btn btn-primary btn-sm stepButton h-75 m-0 p-1' + const disableStepBtnStyle = 'stepButtonDisabled' + const jumpBtnStyle = 'd-flex align-items-center justify-content-center btn btn-primary btn-sm jumpButton h-75 m-0 p-1' + const disableJumpBtnStyle = 'jumpButtonDisabled' + return (
- - - - + + Step over back + + } + > +
{ stepOverBack && stepOverBack() }}> + +
+
+ + Step back + + } + > +
{ stepIntoBack && stepIntoBack() }} data-id="buttonNavigatorIntoBack" id="buttonNavigatorIntoBackContainer"> + +
+
+ + Step into + + } + > +
{ stepIntoForward && stepIntoForward() }} data-id="buttonNavigatorIntoForward" id="buttonNavigatorIntoFowardContainer"> + +
+
+ + Step over forward + + } + > +
{ stepOverForward && stepOverForward() }} data-id="buttonNavigatorOverForward" id="buttonNavigatorOverForwardContainer"> + +
+
- - - + + {'Jump to the previous breakpoint'} + + } + > +
{ jumpPreviousBreakpoint && jumpPreviousBreakpoint() }} data-id="buttonNavigatorJumpPreviousBreakpoint"> + +
+
+ + {'Jump out'} + + } + > +
{ jumpOut && jumpOut() }} data-id="buttonNavigatorJumpOut" id="buttonNavigatorJumpOutContainer"> + +
+
+ + {'Jump to the next breakpoint'} + + } + > +
{ jumpNextBreakpoint && jumpNextBreakpoint() }} data-id="buttonNavigatorJumpNextBreakpoint" id="buttonNavigatorJumpNextBreakpointContainer"> + +
+
- This call has reverted, state changes made during the call will be reverted. + This call has reverted, state changes made during the call will be reverted. This call will run out of gas. The parent call will throw an exception
Click { jumpToException && jumpToException() }}>here to jump where the call reverted.
diff --git a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx index ea3b53855b..df51c8a512 100644 --- a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx @@ -9,6 +9,7 @@ import { Toaster } from '@remix-ui/toaster' // eslint-disable-line import { isValidHash } from '@remix-ui/helper' /* eslint-disable-next-line */ import './debugger-ui.css' +import { OverlayTrigger, Tooltip } from 'react-bootstrap' const _paq = (window as any)._paq = (window as any)._paq || [] export const DebuggerUI = (props: DebuggerUIProps) => { @@ -121,7 +122,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { }) debuggerInstance.event.register('newSourceLocation', async (lineColumnPos, rawLocation, generatedSources, address) => { - if (!lineColumnPos) { + if (!lineColumnPos) { await debuggerModule.discardHighlight() setState(prevState => { return { ...prevState, sourceLocationStatus: 'Source location not available, neither in Sourcify nor in Etherscan. Please make sure the Etherscan api key is provided in the settings.' } @@ -351,12 +352,21 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
- { + + {"Debug with generated sources"} + + } placement="top-start" + > + + { setState(prevState => { return { ...prevState, opt: { ...prevState.opt, debugWithGeneratedSources: checked } } }) - }} type="checkbox" title="Debug with generated sources" /> + }} type="checkbox" /> + +
{ state.isLocalNodeUsed &&
{ @@ -371,11 +381,11 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
{ state.debugging && state.sourceLocationStatus &&
{state.sourceLocationStatus}
} - { !state.debugging && + { !state.debugging &&
- When Debugging with a transaction hash, + When Debugging with a transaction hash, if the contract is verified, Remix will try to fetch the source code from Sourcify or Etherscan. Put in your Etherscan API key in the Remix settings. For supported networks, please see: https://sourcify.dev & https://etherscan.io/contractsVerified diff --git a/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx b/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx index eb0ebd6914..f50e153484 100644 --- a/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx @@ -1,4 +1,5 @@ import React, { useState, useEffect, useRef } from 'react' //eslint-disable-line +import { OverlayTrigger, Tooltip } from 'react-bootstrap' import './tx-browser.css' export const TxBrowser = ({ requestDebug, updateTxNumberFlag, unloadRequested, transactionNumber, debugging }) => { @@ -64,16 +65,29 @@ export const TxBrowser = ({ requestDebug, updateTxNumberFlag, unloadRequested, t />
- +
+ +
+
diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx index ba729b5c0a..9033cd8710 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx @@ -31,7 +31,18 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => {
{plugin?.profile.displayName || plugin?.profile.name}
- {plugin?.profile?.maintainedBy?.toLowerCase() === "remix" && ()} + {plugin?.profile?.maintainedBy?.toLowerCase() === "remix" && ( + + {"Maintained by Remix"} + + } + > + + + )}