Opera developer tools

Forums » Dev.Opera » Archived Article Discussions

This topic has been closed. No new entries allowed.

Reason: You can now post comments on articles on Dev Opera

Forum rules and guidelines

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

15. November 2006, 16:09:41

operadev

Posts: 3

Opera developer tools

Get an early glimpse of developer tools used internally by Web Application developers at Opera Software.

( Read the article )

15. November 2006, 16:48:45

shoust

Operaised

Posts: 3194

None of the tools work on specific sites that set document.domain.

like http://www.ebay.co.uk for example.

Here is the discussion about it.

http://my.opera.com/community/forums/topic.dml?id=166247
My Opera I burning the E
Thats the way it should always B.
smile

15. November 2006, 18:36:28

Eddie_Lopez

elcid73

Posts: 159

Looks good on the handful of sites I've played with... Look forward to using it!

Usability, Human Factors and the design of everyday things at <a href="http://my.opera.com/usability"><b>User Centered</b></a>

See also: <a href="http://my.opera.com/elcid73/about/">My other profile</a> or the <a href="http://my.opera.com/moug"><b>MN Opera User Group</b></a>

15. November 2006, 18:48:21

FataL

Opera freak

Posts: 1443

Very nice preview of tools. Thanks!
Even in that state (pretty good after all) they could be very helpful.
Especially I like CSS editor and metrics of node view.
BTW in CSS editor there should be highlighting not only on mouse hover but also on focus...
Main browser and mail: 9.27 • Secondary: 10.63 (still has annoying UI regressions: inability to detach tab normally, passes source file w/o extension to external editors)
extendopera.orgReport bugs to public BTS

15. November 2006, 19:05:45

Rooy

Posts: 13

Nice work, I really like the CSS Editor.
The DOM console doesn't show scrollbar, so I'm disoriented when expanding a large section.
And how can I put the toolbar into Panel?

15. November 2006, 20:00:40 (edited)

Daedalus

Posts: 1896

Very nice stuff, they seem to be better than the other similar js-buttons I've been using smile

The CSS editor is awesomely fun to play with bigsmile

15. November 2006, 20:20:22 (edited)

porneL

79% geek, 47% nerd

Posts: 2629

Actually I prefer MouseOverDomInspector in its older version

Like MODI, these are just simple JS scripts - not even like Dorsera for WebKit with (which is a sortof a script too, but has look'n'feel of a proper application) and far cry from Xyle Scope.

I hoped for something more advanced and better integrated from Opera :/

DOM inspector doesn't even open in a panel so (on Mac crippled-MDI Opera) every click on a page hides it! It should be in a panel...

I'm looking forward to version 2 then smile

15. November 2006, 21:48:08

Trof

Blüe frëak

Posts: 416

I' amazed !! yes
As a preview it's very good. I love CSS editor in particular.
I just miss one good feature. 'Revert' button that will return back to the original file, when you mess with it too much wink
Opera 11 on WinXP/Opera Mobile on Google Nexus S

Our country has a serious deficiency in lighthouses. I assume the main reason is that we have no sea.

15. November 2006, 23:25:33

alwaysOpera

Posts: 618

great release!
these three tools will be really useful!
Ozone member - Operazone community

16. November 2006, 02:51:10

kyleabaker

mr. kyleabaker

Posts: 207

Excellent preview guys! I hope to see more tools and improvements to these in the very near future! wink These are very helpful already! I Especially like the code coded view of the source using "DOM Snapshot", wish the source viewer was color coded and numbered as well. wink I also think that the DOM Snapshot page should have a button to "Open in Source Viewer" or something like that.
<a href="http://www.kyleabaker.com/">kyleabaker.com</a>
<a href="http://www.bimmermania.com/">bimmermania.com</a>
<a href="http://www.operawatch.com/">operawatch.com</a>

16. November 2006, 03:03:17

cheshrkat

Posts: 16

I like this a lot. What I'd also like is an easy way to add a "reload from cache" button to a visible toolbar. For a daily workflow, tools → advanced → reload from cache is far too fussy.

DOM snapshot is great - something I use a lot in Firefox and miss in Opera.
--- http://www.200ok.com.au/
--- The future has arrived, it's just not
--- evenly distributed. - William Gibson

16. November 2006, 03:19:32

Kildor

Posts: 153

No, it`s not a firebugs :-(
Really, there are many of userjs|favelets tools, many of it works even in O7
But it`s JS, and it is not able really debug, or modify, or step-by-step execute JS (how I can add breakpoint to script?)

I will be wait really tools, written as part of Opera…
All what you want, and blade of the rose indeed...

16. November 2006, 07:34:34

GT500

GT500.org

Posts: 3476

I love the CSS Editor and the DOM Snapshot. They're very nicely done. Especially the CSS Editor... wink

16. November 2006, 10:41:24

mathbr

Posts: 41

Why don’t you use XMLSerializer for the DOM Snapshot? This way, you’ll get the *real* generated source, including the XML declaration.

16. November 2006, 10:41:41

Opera Software

Rijk

I was here

Posts: 4060

Originally posted by porneL:

DOM inspector doesn't even open in a panel so (on Mac crippled-MDI Opera) every click on a page hides it! It should be in a panel...



Even in a MDI-capable OS the separate popup can get in the way. But there is a nice way to work around this: drag the tab for the popup to the desktop, making it a detached tab. On Linux you can do this from the tab context menu, IIRC. Then, you can arrange the window sizes so the detached tab and the original window don't overlap. I've no Mac here, but I would think this should work with MacOpera as well.
"The real issue is about design: designing things that have the power required for the job while maintaining understandability, the feeling of control, and the pleasure of accomplishment." Don Norman
Tweak blog

16. November 2006, 14:53:21

aleto

A Man from Zuerich

Posts: 1859

Originally posted by mathbr:

Why don’t you use XMLSerializer for the DOM Snapshot? This way, you’ll get the *real* generated source, including the XML declaration.



Hi

We have actually done it in this way in the beginning. But as bigger the generated DOM is, the less readable is the output from the XMLSerializer.

16. November 2006, 16:33:46

FataL

Opera freak

Posts: 1443

I really don't like that every margin: 0 in CSS editor appears as:
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;

The same for border, padding, background, etc.
Firefox CSS editor from Developer Toolbar present CSS rules as they appers in source.
Main browser and mail: 9.27 • Secondary: 10.63 (still has annoying UI regressions: inability to detach tab normally, passes source file w/o extension to external editors)
extendopera.orgReport bugs to public BTS

16. November 2006, 18:03:25

ytsmabeer

Frisian translator of Stuff

Posts: 1879

Originally posted by FataL:

I really don't like that every margin: 0 in CSS editor appears as:
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;

The same for border, padding, background, etc.
Firefox CSS editor from Developer Toolbar present CSS rules as they appers in source.



I find this way great, you can test little changes better.

16. November 2006, 18:38:00 (edited)

quiris

Posts: 6578

Originally posted by Rijk:

I've no Mac here, but I would think this should work with MacOpera as well.


In Mac pop-up windows are always separate from main Opera window.

BTW. DOM Snapshot doesn't work with pages served as application/xhtml+xml For example: http://operapl.net/

16. November 2006, 19:12:02

FataL

Opera freak

Posts: 1443

I find this way great, you can test little changes better.

I totally disagree! Clean CSS becomes a huge mess. And you don't see real (author) stylesheet, but instead some interpretation of it.
Main browser and mail: 9.27 • Secondary: 10.63 (still has annoying UI regressions: inability to detach tab normally, passes source file w/o extension to external editors)
extendopera.orgReport bugs to public BTS

16. November 2006, 19:30:19

aleto

A Man from Zuerich

Posts: 1859

Originally posted by quiris:

BTW. DOM Snapshot doesn't work with pages served as application/xhtml+xml For example: http://operapl.net/



Thank you for the hint, quiris, we will fix this.

(The problem is not the mime type, try e.g. http://aleto.ch/test/menu11.xml .)


16. November 2006, 20:29:02

quiris

Posts: 6578

Originally posted by aleto:

The problem is not the mime type, try e.g. http://aleto.ch/test/menu11.xml


So where is a problem? wink

16. November 2006, 23:49:43

viggen

Posts: 13

Cool previews! I hope it eventually will be something more like the web developer toolbar in firefox when it is finished (i.e. a own toolbar with customized buttons). It would also be good if these kind of tools would open in some sort of panel and not a new window/tab. It would also be grate if the error console was able to put within a own panel.

17. November 2006, 10:24:43

aleto

A Man from Zuerich

Posts: 1859

Originally posted by quiris:

So where is a problem?



It's a call on a none existing object, i have fixed it smile .

17. November 2006, 11:19:14

burnout426

Posts: 9855

In the Dom console, check the href attribute of a mailto link. The address for the link that is provided for you to click on has http://site.com/mailto:email%40site.com for example.

18. November 2006, 19:48:09

Netegrof

Posts: 380

How I can add the dev-toolbar to Opera???

18. November 2006, 22:10:27

Opera Software

d.i.z.

bug hunter

Posts: 3026

aleto, I would like to know how you fixed it. I though that it's not possible to call document.write on window opened from xml site. I would like to know solution for this problem (seems that files on server are not updated yet).

19. November 2006, 17:03:10

aleto

A Man from Zuerich

Posts: 1859

Originally posted by d.i.z.:

I though that it's not possible to call document.write on window opened from xml site.



That was in Opera 8 the case. The new window has had allways the same mime type as the opener document. But in Opera 9 this has changed, an empty window has the mime type text/html (actually i'm not sure if it gets that type in the moment where one uses the document.write method on an empty document).

19. November 2006, 17:10:17

aleto

A Man from Zuerich

Posts: 1859

Originally posted by Salsero_Nash:

How I can add the dev-toolbar to Opera???



You can drag and drop the tools from http://dev.opera.com/articles/view/opera-developer-tools/ to one of your toolbars or click a link on that site and drag and drop them form your buttons>my buttons tab to your toolbar.

19. November 2006, 20:02:32

Opera Software

d.i.z.

bug hunter

Posts: 3026

Originally posted by aleto:

That was in Opera 8 the case. The new window has had allways the same mime type as the opener document. But in Opera 9 this has changed, an empty window has the mime type text/html


Wow, thanks for pointing this out. Gonna update my script.

20. November 2006, 08:42:56

quiris

Posts: 6578

I've found a new glitch. Try open a CSS editor on http://my.opera.com/quiris/blog/ The last stylesheet http://files.myopera.com/quiris/user.css can't be expanded with "show rules" button sad

20. November 2006, 09:40:54

aleto

A Man from Zuerich

Posts: 1859

Originally posted by quiris:

I've found a new glitch. Try open a CSS editor on http://my.opera.com/quiris/blog/ The last stylesheet http://files.myopera.com/quiris/user.css can't be expanded with "show rules" button



That's the same domain origin policy, js has no cross domain access, that goes for stylesheets as well.

20. November 2006, 11:06:14

quiris

Posts: 6578

Originally posted by aleto:

That's the same domain origin policy, js has no cross domain access, that goes for stylesheets as well.


Thanks for the explanation. IMHO Such cases should be notified properly. "Access denied" or smth...

20. November 2006, 12:29:55

Contrid

Contrid

Posts: 49

Thank you very much. wink
The CSS editor comes in very handy.
Play videos on your website - www.flvvideoplayer.com

21. November 2006, 00:51:47

Stahn

lolfang

Posts: 166

Originally posted by FataL:

I really don't like that every margin: 0 in CSS editor appears as:
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;

The same for border, padding, background, etc.
Firefox CSS editor from Developer Toolbar present CSS rules as they appers in source.


I second this request to leave the CSS as it is. Every byte counts, and CSS should be as light as possible.
   hi
:domo: Domo-kun FTW - No more Domo-kun lol

21. November 2006, 04:06:38 (edited)

drworm

Posts: 1430

This is really impressive. I had no idea such functionality could be produced in Opera. This is just Javascript right? Keep them coming.

If I can make a request, I would like to see something that allows you to do the same as FireFox's "View Selection Source". I better search the forums for that though.

EDIT: And I found it (http://my.opera.com/community/forums/topic.dml?id=140523) - never mind smile
Ignored popular requests:
Autocomplete form fields (standard in all other browsers - Requested 2003)

www.microugly.com

21. November 2006, 06:48:14

quiris

Posts: 6578

Originally posted by drworm:

If I can make a request, I would like to see something that allows you to do the same as FireFox's "View Selection Source".



Originally posted by drworm:

EDIT: And I found it (http://my.opera.com/community/forums/topic.dml?id=140523) - never mind


It should be provided as a part of an entire tool suite smile Maybe Opera Developers should talk to jkb about adopting his script as an official part of Opera Tools Collection? smile

21. November 2006, 19:03:35

Opera Software

d.i.z.

bug hunter

Posts: 3026

When we will see updated versions?

As of now, they do not work in http://www.gt500.org/blog/ or http://zajec.net for example.

21. November 2006, 19:55:20

aleto

A Man from Zuerich

Posts: 1859

Originally posted by d.i.z.:

As of now, they do not work in http://www.gt500.org/blog/ or http://zajec.net for example.



What is the problem with which tool?

(They work here.)

21. November 2006, 20:10:35

Opera Software

d.i.z.

bug hunter

Posts: 3026

Originally posted by aleto:

What is the problem with which tool?


Ops, this was because of my script that blocks all external scripts. Gotta add another exception to the list.
It was working on https sites and the ones I've added to exception list. That's why it did work on some sites and not other.
Sorry for bothering.

21. November 2006, 20:29:23

Opera Software

d.i.z.

bug hunter

Posts: 3026

Some issue when running script second time (all of the tools are affected)

Timeout thread: delay 50 ms
Error:
name: TypeError
message: Statement on line 811: Type mismatch (usually a non-object value used where an object is required)
Backtrace:
  Line 811 of linked script http://devfiles.myopera.com/articles/59/domConsole_2.js
    var tree = win_doc.getElementById("tree");
  Line 1438 of linked script http://devfiles.myopera.com/articles/59/domConsole_2.js
    update___sourceIndex();
parseSourceIndexArray([]);
  At unknown location
    [statement source code not available]

26. November 2006, 19:16:55

elpres

Posts: 18

CSS Editor crashes Opera (9.02) when used on Wikipedia, can anybody confirm this?

27. November 2006, 09:35:27

aleto

A Man from Zuerich

Posts: 1859

Originally posted by elpres:

CSS Editor crashes Opera (9.02) when used on Wikipedia, can anybody confirm this?



Yes, the CSS editor crashes Opera in some situation, that's a known bug.

27. November 2006, 18:22:31

MarkSchenk

~ The Magus ~

Posts: 648

Will future versions of these tools always require online access? I was working offline this weekend on some scripts (wonky wireless access regularly leaves me offline) and found it annoying that the DOM console didn't work.

Including the scripts in the button could probably be done using data:urls, but local storage would be better, so that they can be updated with new installs.

27. November 2006, 18:52:40

aleto

A Man from Zuerich

Posts: 1859

Originally posted by MarkSchenk:

Will future versions of these tools always require online access? I



Yes, that's the plan atleast.

You can download the scripts as well and put them in your user js directory. Then you can use them with the opera commands (as menu items, e.g. in the document right click menu):

Item, "Snapshot"="Go to page, "javascript:liveSource.open()", , , " ""
Item, "DOM"="Go to page, "javascript:domConsole_2.open()", , ," ""
Item, "CSS"="Go to page, "javascript:cssConsole.open()", , ," ""

(myself i use them in this way)

27. November 2006, 22:52:41

MarkSchenk

~ The Magus ~

Posts: 648

Originally posted by aleto:

Yes, that's the plan atleast.



That is a shame. I would personally prefer to see them shipped with Opera in a Scripts directory, and then executed like userscripts like you described (a very good solution btw, thanks).

The advantages would be:
- no online access needed
- faster loading (no need to wait till script downloads from site)
- easier tweaking of the scripts for personal use

Disadvantages
- more complicated update process, with installer
- the scripts would be in memory for each page

As you can see from this very scientific summing of advantages/disadvantages, they should be shipped with Opera ;-)

28. November 2006, 06:08:19

drworm

Posts: 1430

Originally posted by aleto:

You can download the scripts as well and put them in your user js directory.


The method for downloading these scripts isn't too obvious to me. Any tips?
Ignored popular requests:
Autocomplete form fields (standard in all other browsers - Requested 2003)

www.microugly.com

28. November 2006, 12:35:50

aleto

A Man from Zuerich

Posts: 1859

Hi drworm

if you drag and drop the links for the tools to one of your toolbar, Opera will create a new entry in the toolbar.ini in the toolbar directory in your profile folder. There you can see the link.

28. November 2006, 22:54:51 (edited)

Opera Software

d.i.z.

bug hunter

Posts: 3026

My wishes/suggestions for CSS Editor:

  • Fix security violations.

    For example on Gamespot, there are 3 stylesheets (2 linked, 1 inline). CSS Editor shows only the first one because of exception which is happening when checking cssRules.

    In this line:
        for( k=0; rule=sheet.cssRules[k]; k++)

    add some try{}catch{} because accessing cssRules array on stylesheet from different domain results in halt of script execution.
    Also cssRules button could be disabled in such case.
    Google's blog is another example of such problem. It should show a lot more stylesheets.
  • Add animated 'loading' icon because processing styleSheets can sometimes take time. Try on http://www.xbox.com for example - second stylesheet is appearing after some noticeable delay.
  • Stylesheets imported through @import rule could be shown with some margin on the left side so it would form a more readable tree structure.
  • Frames support would be nice.

30. November 2006, 20:41:44

Grnch

Posts: 33

Any chance these tools could be converted into Web Panels for the sidebar? Having them as separate windows is annoying, because they cover part of the page you are inspecting, and clicking on the inspected page hides the DOM inspector.

Forums » Dev.Opera » Archived Article Discussions