8 ms·
If I'm debugging in an IDE or through a browsers developer tools, I absolutely use the function keys to step through/into/out of code. What should I do instead
by jmkni 10y ago
If I'm debugging in an IDE or through a browsers developer tools, I absolutely use the function keys to step through/into/out of code.
What should I do instead? Serious question.
- Angostura 10y agoI would presume that if the application hasn't been updated for the Touchbar, the Touchbar would default to displaying ESC F1 F2 F3 F4 etc..
- jmkni 10y agoStill though, at the moment I can step through code without really thinking about it, partly because I know where the keys are based on how the keyboard feels, combined with the tactile feedback of pressing the buttons. I would worry that with no physical presence on the keyboard, I would spend a lot more time looking at the keyboard figuring out where the function key I need is than actually getting things done. I would be keen to see a review from somebody who uses the new Macbook Pro professionally as a developer to see if this is as much of an issue as I imagine it to be.
- vijucat 10y ago> I would worry that with no physical presence on the keyboard, I would spend a lot more time looking at the keyboard figuring out where the function key I need is than actually getting things done. Exactly. In Eclipse, F5 steps into a function call, F6 steps over it, F7 returns from the current function, and F8 resumes execution, and mistakenly pressing the adjacent key can be frustrating (although, with time-travel debuggers, this issue might be alleviated?).
- vetinari 10y agoInterestingly, when Lenovo did Thinkpad T430 series, they removed the spacing between the F-keys (in order to fit ESC in the same row). Such a tiny change, yet how much usability it destroyed - suddenly it was impossible to use F-keys by touch. With T440, the spacing was back.
- nicky0 10y agoActually Xcode has been updated for touchbar, and has some useful code editing commands. But does not show any debugging commands in the touchbar. Perhaps it will in future. It is possible to show F keys by holding the fn key and you can configure the touchbar to always show F keys by default.
- sundvor 10y agoAs a touch typist, can you please explain how that would work for me?
- coldtea 10y agoAs a touch typist, can you please explain how function keys are particularly relevant to touch typing? Stepping through the debugger is not typing, and function keys change role according to the selected app anyway. And when they are system function keys (brightness, volume, etc) they are even more irrelevant to typing and/or touch typing. Besides, there's nothing particularly hard about finding a touch based F6 key compared to a physical F6 key. A key's position (which won't change) gives more of a clue than the key's boundaries. Heck, it's called touch typing -- a touch strip doesn't sound that alien to it.
- userbinator 10y agoYou can feel the boundaries of physical keys, unlike virtual ones on a touchscreen. The nubs on F and J serve a similar aligning purpose as, and enhance the functionality of, the interkey gaps on the function key row. Stepping through the debugger is not typing, I disagree. E.g. when you're deciding to step in vs. step past vs. step out vs. run etc.; finding the right key is extremely important. ...and I challenge anyone to hover their fingers over the respective keys continuously for hours without touching them, losing their alignment, or unnecessarily tiring the muscles of their hand.
- sundvor 10y agoThanks, you answered the question perfectly. I never look at the keyboard whilst typing normally. I have transitioned to using Visual Studio 2015 in the last year, and am now also developing my muscle memory of the function keys. I use a Logitech G910 keyboard (love those Romer G switches now, even though it took a while), and e.g. setting a break point with F9 is easy as it's the first key of the third block. For a debugging session, the rest follow - I can rest my fingers on the buttons and just step through / skip over etc - no need to look at all, the focus staying on the code. Actually knowing when I press the button too is extremely important; there's no mistaking the action on a physical keyboard. I also have a X1 Carbon laptop, the first gen. Fantastic keyboard (and thanks to getting the i7/8/256 version which was rather outstanding back then, it still serves me well today even though the 8gb is getting limiting). In its 2nd iteration, they went for capacitive function keys, much to just about everyone's chagrin. Thankfully, Lenovo listened to feedback and in its the 3rd generation the function keys are back to normal, i.e. same as mine. If they bring a 32gb model out by the time I feel I need to upgrade, I'll probably look at another one (in 1-2 years).
- deleted 10y ago[deleted]
- ciaranm 10y agoIf you're using a MBP at the moment - then you're already pressing the fn key to use the functions keys for anything other than the media-stuff they've been designed around for years. Your workflow is exactly the same - you're just using soft keys instead of physical ones.
- bretthoerner 10y agoThere is option on Macs (and basically ever other computer) to flip that so Fn is required for media functionality instead.
- SteveMoody73 10y agoOr change the preferences so the function keys work as expected and you have to use the fn key to access the media options. I probably use the function keys 100x more often than the media ones.
- mcintyre1994 10y agoYou can change that setting, and I imagine most developers who rely on function keys do, so no I'm not already doing that.
- ciaranm 10y agoWell then it's still exactly the same? You can either press fn or change your preferences. You opted for the latter. Do that again?
- mcintyre1994 10y agoSo the touchbar has a setting where it behaves precisely like the current MBP? Esc, row of 12 keys, which are either f1-f12 or media with a setting, and are toggled between with fn? That's strictly worse if I only ever use it like that because it's the same but with soft keys, but sure that's basically the same.
- adamlett 10y agoAre you kidding me? How can you not see that this is nothing more than an arbitrary habit that you've grown comfortable with? Imagine the function keys had never existed to begin with. Don't you think we would have come up with a different way of stepping through code with a debugger? I understand that it's annoying to have to change your habits, but you're a developer for crying out loud: Your job is literally to change how other people do work, to make it more efficient, easier to learn and so on. We all know that our users often resent us, because we change how they have to do their work. But we do it anyway, because we believe deeply (and mostly rightly) that the benefits of progress outweighs the short term annoyances of having to change habits. But when we're the ones who have to change, hoo-boy, suddenly the sky is falling. Give me a break.
- simooooo 10y agoImagine the function keys never existed.. okay! That made it all better.
- jmkni 10y agoWell...pretty much everything you do is an arbitrary habit that you've grown comfortable with. Sleeping in a bed is an arbitrary habit that you've grown comfortable with, why not sleep on the floor, or in the bath? The fact is that when developing and debugging, the function keys represent the most efficient way of stepping through code, and a part of this is to do with their physical presence on the keyboard. I know that I don't have to use them, there are other ways to achieve the same thing, but those things have always been there and I choose the function keys because they are the best option.
- tracker1 10y agoI must admit, I rarely use the function keys as they seem to be different everywhere... Mainly from years of VS usage, actually... But I use the escape key hundreds of times a day.. not having that as a dedicated key will hinder me as much as removing the backspace key.. I mean nobody needs to go back, and you can just use the mouse with cut..
- adamlett 10y ago
- mahyarm 10y agoThe debug step keys will show up in the touch bar? If they are not stupid enough to swap them around sometimes, then they should stay in the same position.
- coldtea 10y ago>What should I do instead? Serious question Use the strip bar in debugger keys mode, or function keys mode for non-updated apps? Or use printf statements (seriously -- I never advocated for much debugger use, unless it concerns very focused stepping. A lot of people step all around and examine everything and anything for ages with no clear idea of what the bug might be).
- jasonm23 10y agoUse Fn and numbers as function keys and you're done.
- NEDM64 10y agoNo you don't, because this is a Mac, and macOS doesn't use the F keys ever. If you're using Windows, the F keys appear on the Touch Bar. /story